Documentation ¶
Index ¶
- Constants
- Variables
- func NewDigestFromBytes(bytes []byte) (module.BTPDigest, error)
- func NewDigestFromHashAndBytes(hash []byte, bytes []byte) (module.BTPDigest, error)
- func NewDigestWithBuilder(builder merkle.Builder, hash []byte) (module.BTPDigest, error)
- func NewProofContextMap(view StateView) (module.BTPProofContextMap, error)
- func NewSection(digest module.BTPDigest, view StateView, dbase db.Database) (module.BTPSection, error)
- type NetworkTypeView
- type NetworkView
- type SectionBuilder
- type StateView
Constants ¶
View Source
const (
NSFilterCap = 256 / 8
)
Variables ¶
View Source
var ZeroBTPSection = newBTPSection(nil, nil)
View Source
var ZeroDigest = &digest{
core: zeroDigestCore{},
}
View Source
var ZeroProofContextMap = &proofContextMap{ pcMap: make(map[int64]module.BTPProofContext), }
Functions ¶
func NewDigestWithBuilder ¶
func NewProofContextMap ¶
func NewProofContextMap(view StateView) (module.BTPProofContextMap, error)
func NewSection ¶
func NewSection( digest module.BTPDigest, view StateView, dbase db.Database, ) (module.BTPSection, error)
NewSection returns a new Section. view shall have the final value for a transition.
Types ¶
type NetworkTypeView ¶
type NetworkView ¶
type SectionBuilder ¶
type SectionBuilder interface { SendMessage(nid int64, msg []byte) EnsureSection(nid int64) NotifyInactivated(ntid int64) Build() (module.BTPSection, error) }
func NewSectionBuilder ¶
func NewSectionBuilder(view StateView) SectionBuilder
NewSectionBuilder returns new SectionBuilder. view shall have the final value for a transition except Network's PrevNetworkSectionHash and LastNetworkSectionHash fields. The two fields shall have initial value for the transition.
type StateView ¶
type StateView interface { GetNetworkTypeIDs() ([]int64, error) GetNetworkView(nid int64) (NetworkView, error) GetNetworkTypeView(ntid int64) (NetworkTypeView, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.