mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 01:41:48 +00:00
network: refactor P2PNotaryRequest decoding
We need to provide magic for both main and fallback transactions during decoding, because transactions hashes depend on it.
This commit is contained in:
parent
c14e34cdb5
commit
5c2ea2d5bb
3 changed files with 40 additions and 5 deletions
|
@ -524,6 +524,7 @@ func TestGetData(t *testing.T) {
|
|||
})
|
||||
t.Run("p2pNotaryRequest", func(t *testing.T) {
|
||||
mainTx := &transaction.Transaction{
|
||||
Network: netmode.UnitTestNet,
|
||||
Attributes: []transaction.Attribute{{Type: transaction.NotaryAssistedT, Value: &transaction.NotaryAssisted{NKeys: 1}}},
|
||||
Script: []byte{0, 1, 2},
|
||||
ValidUntilBlock: 123,
|
||||
|
@ -533,6 +534,7 @@ func TestGetData(t *testing.T) {
|
|||
mainTx.Size()
|
||||
mainTx.Hash()
|
||||
fallbackTx := &transaction.Transaction{
|
||||
Network: netmode.UnitTestNet,
|
||||
Script: []byte{1, 2, 3},
|
||||
ValidUntilBlock: 123,
|
||||
Attributes: []transaction.Attribute{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue