io: drop Size() method from Serializable and associated

It's no longer needed after the io.GetVarSize() improvement. It's duplicating
a lot of EncodeBinary() logic also.
This commit is contained in:
Roman Khimov 2019-09-16 16:08:00 +03:00
parent 56c72b5c67
commit e299a44983
28 changed files with 8 additions and 149 deletions

View file

@ -141,7 +141,7 @@ func TestGetTransaction(t *testing.T) {
}
assert.Equal(t, block.Index, height)
assert.Equal(t, block.Transactions[0], tx)
assert.Equal(t, 10, tx.Size())
assert.Equal(t, 10, io.GetVarSize(tx))
assert.Equal(t, 1, io.GetVarSize(tx.Attributes))
assert.Equal(t, 1, io.GetVarSize(tx.Inputs))
assert.Equal(t, 1, io.GetVarSize(tx.Outputs))