aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/chequebook/cheque_test.go
diff options
context:
space:
mode:
authorS. Matthew English <s-matthew-english@users.noreply.github.com>2017-06-12 20:45:17 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-06-12 20:45:17 +0800
commit061889d4ea13b23d777efbe005210ead8667e869 (patch)
tree35a391e5ac09e683796c3c698f36542f06803d03 /contracts/chequebook/cheque_test.go
parente3dfd5582026a8744a80d3de407601526b720abb (diff)
downloadgo-tangerine-061889d4ea13b23d777efbe005210ead8667e869.tar
go-tangerine-061889d4ea13b23d777efbe005210ead8667e869.tar.gz
go-tangerine-061889d4ea13b23d777efbe005210ead8667e869.tar.bz2
go-tangerine-061889d4ea13b23d777efbe005210ead8667e869.tar.lz
go-tangerine-061889d4ea13b23d777efbe005210ead8667e869.tar.xz
go-tangerine-061889d4ea13b23d777efbe005210ead8667e869.tar.zst
go-tangerine-061889d4ea13b23d777efbe005210ead8667e869.zip
rlp, trie, contracts, compression, consensus: improve comments (#14580)
Diffstat (limited to 'contracts/chequebook/cheque_test.go')
-rw-r--r--contracts/chequebook/cheque_test.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/contracts/chequebook/cheque_test.go b/contracts/chequebook/cheque_test.go
index d5b343024..1f8b71129 100644
--- a/contracts/chequebook/cheque_test.go
+++ b/contracts/chequebook/cheque_test.go
@@ -414,21 +414,10 @@ func TestCash(t *testing.T) {
t.Fatalf("expected no error, got %v", err)
}
backend.Commit()
- // expBalance := big.NewInt(2)
- // gotBalance := backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
// after 3x interval time and 2 cheques received, exactly one cashing tx is sent
time.Sleep(4 * interval)
backend.Commit()
- // expBalance = big.NewInt(4)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
-
// after stopping autocash no more tx are sent
ch2, err := chbook.Issue(addr1, amount)
if err != nil {
@@ -441,11 +430,6 @@ func TestCash(t *testing.T) {
}
time.Sleep(2 * interval)
backend.Commit()
- // expBalance = big.NewInt(4)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
// autocash below 1
chbook.balance = big.NewInt(2)
@@ -456,11 +440,6 @@ func TestCash(t *testing.T) {
t.Fatalf("expected no error, got %v", err)
}
backend.Commit()
- // expBalance = big.NewInt(4)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
ch4, err := chbook.Issue(addr1, amount)
if err != nil {
@@ -479,13 +458,6 @@ func TestCash(t *testing.T) {
}
backend.Commit()
- // 2 checks of amount 1 received, exactly 1 tx is sent
- // expBalance = big.NewInt(6)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
-
// autochash on receipt when maxUncashed is 0
chbook.balance = new(big.Int).Set(common.Big2)
chbox.AutoCash(0, common.Big0)
@@ -495,11 +467,6 @@ func TestCash(t *testing.T) {
t.Fatalf("expected no error, got %v", err)
}
backend.Commit()
- // expBalance = big.NewInt(5)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
ch6, err := chbook.Issue(addr1, amount)
if err != nil {
@@ -511,21 +478,11 @@ func TestCash(t *testing.T) {
t.Fatalf("expected no error, got %v", err)
}
backend.Commit()
- // expBalance = big.NewInt(4)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
_, err = chbox.Receive(ch6)
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
backend.Commit()
- // expBalance = big.NewInt(6)
- // gotBalance = backend.BalanceAt(addr1)
- // if gotBalance.Cmp(expBalance) != 0 {
- // t.Fatalf("expected beneficiary balance %v, got %v", expBalance, gotBalance)
- // }
}