native: send GAS to a committee member on persist
This commit is contained in:
parent
5a38208361
commit
43b3e15330
4 changed files with 64 additions and 11 deletions
|
@ -587,7 +587,7 @@ func TestSubscriptions(t *testing.T) {
|
|||
blocks, err := bc.genBlocks(1)
|
||||
require.NoError(t, err)
|
||||
require.Eventually(t, func() bool { return len(blockCh) != 0 }, time.Second, 10*time.Millisecond)
|
||||
assert.Empty(t, notificationCh)
|
||||
assert.Len(t, notificationCh, 1) // validator bounty
|
||||
assert.Len(t, executionCh, 1)
|
||||
assert.Empty(t, txCh)
|
||||
|
||||
|
@ -598,6 +598,9 @@ func TestSubscriptions(t *testing.T) {
|
|||
aer := <-executionCh
|
||||
assert.Equal(t, b.Hash(), aer.TxHash)
|
||||
|
||||
notif := <-notificationCh
|
||||
require.Equal(t, bc.UtilityTokenHash(), notif.ScriptHash)
|
||||
|
||||
script := io.NewBufBinWriter()
|
||||
emit.Bytes(script.BinWriter, []byte("yay!"))
|
||||
emit.Syscall(script.BinWriter, interopnames.SystemRuntimeNotify)
|
||||
|
@ -665,9 +668,12 @@ func TestSubscriptions(t *testing.T) {
|
|||
}
|
||||
}
|
||||
assert.Empty(t, txCh)
|
||||
assert.Empty(t, notificationCh)
|
||||
assert.Len(t, notificationCh, 1)
|
||||
assert.Empty(t, executionCh)
|
||||
|
||||
notif = <-notificationCh
|
||||
require.Equal(t, bc.UtilityTokenHash(), notif.ScriptHash)
|
||||
|
||||
bc.UnsubscribeFromBlocks(blockCh)
|
||||
bc.UnsubscribeFromTransactions(txCh)
|
||||
bc.UnsubscribeFromNotifications(notificationCh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue