mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 23:55:11 +00:00
native: support postPersist
method
It should be called for NEO contract to distribute committee bounties.
This commit is contained in:
parent
e8eb177c64
commit
c5cdaae87a
10 changed files with 143 additions and 35 deletions
|
@ -588,7 +588,7 @@ func TestSubscriptions(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.Eventually(t, func() bool { return len(blockCh) != 0 }, time.Second, 10*time.Millisecond)
|
||||
assert.Len(t, notificationCh, 1) // validator bounty
|
||||
assert.Len(t, executionCh, 1)
|
||||
assert.Len(t, executionCh, 2)
|
||||
assert.Empty(t, txCh)
|
||||
|
||||
b := <-blockCh
|
||||
|
@ -597,6 +597,8 @@ func TestSubscriptions(t *testing.T) {
|
|||
|
||||
aer := <-executionCh
|
||||
assert.Equal(t, b.Hash(), aer.TxHash)
|
||||
aer = <-executionCh
|
||||
assert.Equal(t, b.Hash(), aer.TxHash)
|
||||
|
||||
notif := <-notificationCh
|
||||
require.Equal(t, bc.UtilityTokenHash(), notif.ScriptHash)
|
||||
|
@ -669,11 +671,15 @@ func TestSubscriptions(t *testing.T) {
|
|||
}
|
||||
assert.Empty(t, txCh)
|
||||
assert.Len(t, notificationCh, 1)
|
||||
assert.Empty(t, executionCh)
|
||||
assert.Len(t, executionCh, 1)
|
||||
|
||||
notif = <-notificationCh
|
||||
require.Equal(t, bc.UtilityTokenHash(), notif.ScriptHash)
|
||||
|
||||
exec = <-executionCh
|
||||
require.Equal(t, b.Hash(), exec.TxHash)
|
||||
require.Equal(t, exec.VMState, vm.HaltState)
|
||||
|
||||
bc.UnsubscribeFromBlocks(blockCh)
|
||||
bc.UnsubscribeFromTransactions(txCh)
|
||||
bc.UnsubscribeFromNotifications(notificationCh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue