Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

swap: prevent debt cheques #1983

Merged
merged 65 commits into from
Feb 6, 2020
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
671a30d
swap: add DefaultChequeDebtTolerance const
mortelli Nov 26, 2019
2723804
swap: add code to prevent accepting cheques which would put the node …
mortelli Nov 26, 2019
75cfe23
swap: rename DefaultChequeDebtTolerance const to ChequeDebtTolerance
mortelli Nov 26, 2019
4b85c4d
swap: improve bad cheques prevention comments
mortelli Nov 26, 2019
01b42ab
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Nov 28, 2019
8df2245
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Dec 4, 2019
d69ced8
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Dec 5, 2019
6bc0fe5
swap: duplicate ChequeDebtTolerance
mortelli Dec 6, 2019
6044ec6
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Dec 11, 2019
d0e8146
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Dec 23, 2019
619129f
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 9, 2020
8ee2e2c
swap: simplify ChequeDebtTolerance calculation
mortelli Jan 9, 2020
5f2b9f5
swap: fix bug in processAndVerifyCheque
mortelli Jan 9, 2020
0aa47da
swap: add first iteration for TestDebtChequeTolerance
mortelli Jan 9, 2020
b271f2d
swap: iterate TestDebtChequeTolerance test
mortelli Jan 10, 2020
ab755d9
swap: TestDebtChequeTolerance
mortelli Jan 10, 2020
4a6c3a3
swap: add TestDebtCheques func
mortelli Jan 10, 2020
f02a9f2
swap: iterate TestDebtCheques
mortelli Jan 10, 2020
03484ad
swap: iterate TestDebtCheques
mortelli Jan 10, 2020
daa620a
swap: iterate TestDebtCheques function
mortelli Jan 10, 2020
eb7d34a
swap: iterate TestDebtCheques function
mortelli Jan 10, 2020
068b58c
swap: iterate TestDebtCheques function
mortelli Jan 10, 2020
9ba613d
swap: add missing error handling in swap tests
mortelli Jan 10, 2020
b1a0cfc
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 10, 2020
ba65ef7
swap: simplify error handling in swap tests
mortelli Jan 10, 2020
d558c16
swap: small refactor in tests
mortelli Jan 13, 2020
1ceb4f2
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 13, 2020
ba551bc
swap: refactor TestDebtCheques
mortelli Jan 13, 2020
03d601b
swap: iterate TestDebtCheques function
mortelli Jan 13, 2020
c7ceba3
swap: add missing error catch for TestTriggerPaymentThreshold
mortelli Jan 13, 2020
f044532
swap: fix typo in TestDebtCheques
mortelli Jan 13, 2020
1f386ae
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 15, 2020
e17b503
swap: fix bug in processAndVerifyCheque return
mortelli Jan 16, 2020
22b4dd3
swap: fix formatting in TestDebtCheques
mortelli Jan 16, 2020
7706df9
swap: add testMsgSmallPrice type
mortelli Jan 16, 2020
4d33e9e
swap: remove TestPingPongChequeSimulation
mortelli Jan 16, 2020
de01e2d
swap: iterate TestMultiChequeSimulation
mortelli Jan 16, 2020
5869533
swap: iterate TestMultiChequeSimulation
mortelli Jan 16, 2020
78561f2
swap: iterate TestMultiChequeSimulation
mortelli Jan 16, 2020
b449607
swap: iterate TestMultiChequeSimulation
mortelli Jan 16, 2020
1e815e8
swap: iterate TestMultiChequeSimulation
mortelli Jan 16, 2020
f34200a
swap: iterate TestMultiChequeSimulation
mortelli Jan 17, 2020
585e77d
swap: iterate TestMultiChequeSimulation, remove testMsgBigPrice
mortelli Jan 17, 2020
5e53773
swap: fix wrong ChequeDebtTolerance computation
mortelli Jan 17, 2020
fd99c9c
swap: call Equal for cheques comparison in TestDebtCheques
mortelli Jan 17, 2020
9102171
swap: iterate TestDebtCheques
mortelli Jan 17, 2020
1ff452c
swap: iterate TestDebtCheques
mortelli Jan 17, 2020
f4757e2
swap: iterate TestDebtCheques
mortelli Jan 17, 2020
5010458
swap: add debug log to TestMultiChequeSimulation
mortelli Jan 20, 2020
39f3aae
swap: add check for all messages received in TestMultiChequeSimulatio…
mortelli Jan 20, 2020
5b6f493
swap: remove debug print in TestMultiChequeSimulation
mortelli Jan 20, 2020
6ca077b
swap: small refactor to TestMultiChequeSimulation
mortelli Jan 20, 2020
8e8df8a
Revert "swap: small refactor to TestMultiChequeSimulation"
mortelli Jan 20, 2020
3faf60a
swap: simplify TestDebtCheques function
mortelli Jan 21, 2020
63229eb
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 21, 2020
7d1ce9c
swap: remove extra context in TestMultiChequeSimulation
mortelli Jan 22, 2020
1d885fc
swap: remove randomness in TestMultiChequeSimulation
mortelli Jan 22, 2020
77a153b
swap: fix wrong error message in sendCheque function
mortelli Jan 22, 2020
7fa9e47
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 28, 2020
f1a46a0
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 29, 2020
d2402bb
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 30, 2020
594d900
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Jan 30, 2020
415e7f6
swap: fix wrong types in tests
mortelli Jan 30, 2020
8888cfc
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Feb 5, 2020
3117c81
Merge remote-tracking branch 'origin/master' into swap-prevent-debt-c…
mortelli Feb 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
swap: fix wrong error message in sendCheque function
  • Loading branch information
mortelli committed Jan 22, 2020
commit 77a153b0c3db00ab283ec35ad37316191de35284
2 changes: 1 addition & 1 deletion swap/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (p *Peer) sendCheque() error {
honeyAmount := int64(cheque.Honey)
err = p.updateBalance(honeyAmount)
if err != nil {
return fmt.Errorf("error while creating cheque: %v", err)
return fmt.Errorf("error while updating balance: %v", err)
}

metrics.GetOrRegisterCounter("swap.cheques.emitted.num", nil).Inc(1)
Expand Down