io: refactor BinReader.ReadArray()
Make it accept arbitrary slice pointer.
This commit is contained in:
parent
2f838df585
commit
b16e56a47b
9 changed files with 86 additions and 34 deletions
|
@ -128,7 +128,7 @@ func (b *Block) Trim() ([]byte, error) {
|
|||
// Serializable interface.
|
||||
func (b *Block) DecodeBinary(br *io.BinReader) {
|
||||
b.BlockBase.DecodeBinary(br)
|
||||
b.Transactions = br.ReadArray(transaction.Transaction{}).([]*transaction.Transaction)
|
||||
br.ReadArray(&b.Transactions)
|
||||
}
|
||||
|
||||
// EncodeBinary encodes the block to the given BinWriter, implementing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue