parser: implement whole-block parsing and publicize constructors

This commit is contained in:
George Tankersley
2018-09-28 00:52:40 +00:00
parent e3b5a9558d
commit 58e5f3e78b
6 changed files with 94 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ func (hdr *rawBlockHeader) MarshalBinary() ([]byte, error) {
return backing[:SER_BLOCK_HEADER_SIZE], nil
}
func newBlockHeader() *blockHeader {
func NewBlockHeader() *blockHeader {
return &blockHeader{
rawBlockHeader: new(rawBlockHeader),
}