forked from TrueCloudLab/neoneo-go
smartcontract: use new binaryReader/Writer API from util
This commit is contained in:
parent
361724a33e
commit
eba83a0e31
1 changed files with 7 additions and 5 deletions
|
@ -23,19 +23,21 @@ func TestCreateMultiSigRedeemScript(t *testing.T) {
|
|||
}
|
||||
|
||||
buf := bytes.NewBuffer(out)
|
||||
b, _ := buf.ReadByte()
|
||||
br := util.BinReader{R: buf}
|
||||
var b uint8
|
||||
br.ReadLE(&b)
|
||||
assert.Equal(t, vm.PUSH3, vm.Instruction(b))
|
||||
|
||||
for i := 0; i < len(validators); i++ {
|
||||
b, err := util.ReadVarBytes(buf)
|
||||
bb := br.ReadBytes()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
assert.Equal(t, validators[i].Bytes(), b)
|
||||
assert.Equal(t, validators[i].Bytes(), bb)
|
||||
}
|
||||
|
||||
b, _ = buf.ReadByte()
|
||||
br.ReadLE(&b)
|
||||
assert.Equal(t, vm.PUSH3, vm.Instruction(b))
|
||||
b, _ = buf.ReadByte()
|
||||
br.ReadLE(&b)
|
||||
assert.Equal(t, vm.CHECKMULTISIG, vm.Instruction(b))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue