Documentation ¶
Index ¶
- Variables
- type NonceBitMask
- type NonceSet
- func (s *NonceSet) Add(nonce uint64, maxLength uint64) (error, bool)
- func (s *NonceSet) DeepCopy(other *NonceSet)
- func (s *NonceSet) NextNonce() uint64
- func (s *NonceSet) Reset(start uint64) (error, bool)
- func (s *NonceSet) ResetThenSearch(needReset bool, newStart uint64, nonce uint64, maxLength uint64) (SearchResult, error, bool)
- func (s *NonceSet) Search(nonce uint64, maxLength uint64) SearchResult
- func (n *NonceSet) String() string
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type NonceBitMask ¶
type NonceBitMask []byte
type NonceSet ¶
type NonceSet struct { Start uint64 BitMask NonceBitMask Length uint32 // num of bit }
func NewNonceSet ¶
func (*NonceSet) ResetThenSearch ¶
func (s *NonceSet) ResetThenSearch(needReset bool, newStart uint64, nonce uint64, maxLength uint64) (SearchResult, error, bool)
if param 'needReset' is false , will not use param 'newStart'
type SearchResult ¶
type SearchResult int8
const ( NotAllowedTooNew SearchResult = -1 NotContainedAndAllowed SearchResult = 0 Contained SearchResult = 1 NotAllowedTooOld SearchResult = 2 )
Click to show internal directories.
Click to hide internal directories.