Fix a few comment typos.
This commit is contained in:
parent
e473fd6eb8
commit
bf5c0b58d8
3 changed files with 2 additions and 3 deletions
|
@ -14,7 +14,7 @@ import (
|
|||
const BlockVersion uint32 = 2
|
||||
|
||||
// Version 4 bytes + Timestamp 4 bytes + Bits 4 bytes + Nonce 4 bytes +
|
||||
// TxnCount (varInt) + PrevBlock and MarkleRoot hashes.
|
||||
// TxnCount (varInt) + PrevBlock and MerkleRoot hashes.
|
||||
const maxBlockHeaderPayload = 16 + maxVarIntPayload + (HashSize * 2)
|
||||
|
||||
// BlockHeader defines information about a block and is used in the bitcoin
|
||||
|
|
|
@ -22,7 +22,7 @@ type fakeRandReader struct {
|
|||
}
|
||||
|
||||
// Read returns the fake reader error and the lesser of the fake reader value
|
||||
// and the length p.
|
||||
// and the length of p.
|
||||
func (r *fakeRandReader) Read(p []byte) (int, error) {
|
||||
n := r.n
|
||||
if n > len(p) {
|
||||
|
|
|
@ -104,7 +104,6 @@ func (msg *MsgBlock) BtcDecodeTxLoc(r *bytes.Buffer, pver uint32) ([]TxLoc, erro
|
|||
// BtcEncode encodes the receiver to w using the bitcoin protocol encoding.
|
||||
// This is part of the Message interface implementation.
|
||||
func (msg *MsgBlock) BtcEncode(w io.Writer, pver uint32) error {
|
||||
// XXX: Max transactions?
|
||||
msg.Header.TxnCount = uint64(len(msg.Transactions))
|
||||
|
||||
err := writeBlockHeader(w, pver, &msg.Header)
|
||||
|
|
Loading…
Reference in a new issue