Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSequenceUniqueConstraint = errors.Register("sequence_u256", 1, "sequence already initialized")
)
Functions ¶
func DecodeSequence ¶
func EncodeSequence ¶
Types ¶
type U256 ¶
type U256 struct {
// contains filtered or unexported fields
}
U256 is a persistent unique key generator based on a counter.
func NewSequence256 ¶
func (U256) InitVal ¶
InitVal this function sets the starting value for a sequence and can only be called once on an empty database. If the key already exists, an error will be returned. The provided start value will be stored as the current value. It is advised to use this function only when the sequence start value is not '1', as calling it unnecessarily will consume unnecessary gas. An example scenario would be importing from genesis.
Click to show internal directories.
Click to hide internal directories.