mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-07 05:07:36 +00:00
block: drop Network from the Header
It's not network-tied any more, network is only needed to sign/verify. Unfortunately we still have to keep network in consensus data structures because of dbft library interface.
This commit is contained in:
parent
d314f82db3
commit
95c279325a
28 changed files with 48 additions and 110 deletions
|
@ -4,15 +4,13 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/block"
|
||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
)
|
||||
|
||||
// Headers payload.
|
||||
type Headers struct {
|
||||
Hdrs []*block.Header
|
||||
Network netmode.Magic
|
||||
Hdrs []*block.Header
|
||||
// StateRootInHeader specifies whether header contains state root.
|
||||
StateRootInHeader bool
|
||||
}
|
||||
|
@ -48,7 +46,6 @@ func (p *Headers) DecodeBinary(br *io.BinReader) {
|
|||
|
||||
for i := 0; i < int(lenHeaders); i++ {
|
||||
header := &block.Header{}
|
||||
header.Network = p.Network
|
||||
header.StateRootEnabled = p.StateRootInHeader
|
||||
header.DecodeBinary(br)
|
||||
p.Hdrs[i] = header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue