mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 12:44:19 +01:00
Prevent getting cheated by broadcasting forfeit transactions (#123)
* broadcast forfeit transaction in case the user is trying the cheat the ASP * fix connector input + --cheat flag in CLI * WIP * cleaning and fixes * add TODO * sweeper.go: mark round swept if vtxo are redeemed * fixes after reviews * revert "--cheat" flag in client * revert redeem.go * optimization * update account.go according to ocean ListUtxos new spec * WaitForSync implementation * ocean-wallet/service.go: remove go rountine while writing to notification channel
This commit is contained in:
@@ -296,7 +296,7 @@ func testStartFinalization(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, events)
|
||||
|
||||
events, err = round.StartFinalization(connectors, congestionTree, poolTx)
|
||||
events, err = round.StartFinalization("", connectors, congestionTree, poolTx)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, events, 1)
|
||||
require.True(t, round.IsStarted())
|
||||
@@ -418,7 +418,8 @@ func testStartFinalization(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, f := range fixtures {
|
||||
events, err := f.round.StartFinalization(f.connectors, f.tree, f.poolTx)
|
||||
// TODO fix this
|
||||
events, err := f.round.StartFinalization("", f.connectors, f.tree, f.poolTx)
|
||||
require.EqualError(t, err, f.expectedErr)
|
||||
require.Empty(t, events)
|
||||
}
|
||||
@@ -438,7 +439,7 @@ func testEndFinalization(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, events)
|
||||
|
||||
events, err = round.StartFinalization(connectors, congestionTree, poolTx)
|
||||
events, err = round.StartFinalization("", connectors, congestionTree, poolTx)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, events)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user