io: rename Read/WriteBytes to Read/WriteB
go vet is not happy about them: pkg/io/binaryReader.go:92:21: method ReadByte() byte should have signature ReadByte() (byte, error) pkg/io/binaryWriter.go:75:21: method WriteByte(u8 byte) should have signature WriteByte(byte) error
This commit is contained in:
parent
0b14916d79
commit
8b3080b972
22 changed files with 70 additions and 70 deletions
|
@ -88,7 +88,7 @@ func NewBlockFromTrimmedBytes(b []byte) (*Block, error) {
|
|||
br := io.NewBinReaderFromBuf(b)
|
||||
block.decodeHashableFields(br)
|
||||
|
||||
_ = br.ReadByte()
|
||||
_ = br.ReadB()
|
||||
|
||||
block.Script.DecodeBinary(br)
|
||||
|
||||
|
@ -109,7 +109,7 @@ func NewBlockFromTrimmedBytes(b []byte) (*Block, error) {
|
|||
func (b *Block) Trim() ([]byte, error) {
|
||||
buf := io.NewBufBinWriter()
|
||||
b.encodeHashableFields(buf.BinWriter)
|
||||
buf.WriteByte(1)
|
||||
buf.WriteB(1)
|
||||
b.Script.EncodeBinary(buf.BinWriter)
|
||||
|
||||
buf.WriteVarUint(uint64(len(b.Transactions)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue