mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-25 18:51:39 +00:00
lazifying
This commit is contained in:
@ -5,43 +5,46 @@ import (
|
||||
)
|
||||
|
||||
type Value interface {
|
||||
Bytes() []byte
|
||||
Bytes() []byte
|
||||
}
|
||||
|
||||
type Key interface {
|
||||
Equals(b Key) bool
|
||||
Less(b Key) bool
|
||||
Bytes() []byte
|
||||
Equals(b Key) bool
|
||||
Less(b Key) bool
|
||||
Bytes() []byte
|
||||
}
|
||||
|
||||
type Tree interface {
|
||||
Root() Node
|
||||
Root() Node
|
||||
|
||||
Size() int
|
||||
Has(key Key) bool
|
||||
Get(key Key) (value Value, err error)
|
||||
Hash() ([]byte, int)
|
||||
Size() uint64
|
||||
Height() uint8
|
||||
Has(key Key) bool
|
||||
Get(key Key) (Value, error)
|
||||
Hash() ([]byte, uint64)
|
||||
|
||||
Put(key Key, value Value) (err error)
|
||||
Remove(key Key) (value Value, err error)
|
||||
Put(Key, Value) (err error)
|
||||
Remove(Key) (Value, error)
|
||||
}
|
||||
|
||||
type Node interface {
|
||||
Key() Key
|
||||
Value() Value
|
||||
Left() Node
|
||||
Right() Node
|
||||
Key() Key
|
||||
Value() Value
|
||||
Left() Node
|
||||
Right() Node
|
||||
|
||||
Size() int
|
||||
Has(key Key) bool
|
||||
Get(key Key) (value Value, err error)
|
||||
Hash() ([]byte, int)
|
||||
Size() uint64
|
||||
Height() uint8
|
||||
Has(Key) bool
|
||||
Get(Key) (Value, error)
|
||||
Hash() ([]byte, uint64)
|
||||
Bytes() []byte
|
||||
|
||||
Put(key Key, value Value) (_ *IAVLNode, updated bool)
|
||||
Remove(key Key) (_ *IAVLNode, value Value, err error)
|
||||
Put(Key, Value) (*IAVLNode, bool)
|
||||
Remove(Key) (*IAVLNode, Value, error)
|
||||
}
|
||||
|
||||
type NodeIterator func() (node Node)
|
||||
type NodeIterator func() Node
|
||||
|
||||
func NotFound(key Key) error {
|
||||
return fmt.Errorf("Key was not found.")
|
||||
|
Reference in New Issue
Block a user