mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-23 09:41:38 +00:00
go fmt
This commit is contained in:
@ -1,50 +1,50 @@
|
||||
package merkle
|
||||
|
||||
import (
|
||||
. "github.com/tendermint/tendermint/binary"
|
||||
"fmt"
|
||||
"fmt"
|
||||
. "github.com/tendermint/tendermint/binary"
|
||||
)
|
||||
|
||||
type Value interface {
|
||||
Binary
|
||||
Binary
|
||||
}
|
||||
|
||||
type Key interface {
|
||||
Binary
|
||||
Equals(Binary) bool
|
||||
Less(b Binary) bool
|
||||
Binary
|
||||
Equals(Binary) bool
|
||||
Less(b Binary) bool
|
||||
}
|
||||
|
||||
type Db interface {
|
||||
Get([]byte) []byte
|
||||
Put([]byte, []byte)
|
||||
Get([]byte) []byte
|
||||
Put([]byte, []byte)
|
||||
}
|
||||
|
||||
type Node interface {
|
||||
Binary
|
||||
Key() Key
|
||||
Value() Value
|
||||
Size() uint64
|
||||
Height() uint8
|
||||
Hash() (ByteSlice, uint64)
|
||||
Save(Db)
|
||||
Binary
|
||||
Key() Key
|
||||
Value() Value
|
||||
Size() uint64
|
||||
Height() uint8
|
||||
Hash() (ByteSlice, uint64)
|
||||
Save(Db)
|
||||
}
|
||||
|
||||
type Tree interface {
|
||||
Root() Node
|
||||
Size() uint64
|
||||
Height() uint8
|
||||
Has(key Key) bool
|
||||
Get(key Key) Value
|
||||
Hash() (ByteSlice, uint64)
|
||||
Save()
|
||||
Put(Key, Value) bool
|
||||
Remove(Key) (Value, error)
|
||||
Copy() Tree
|
||||
Traverse(func(Node)bool)
|
||||
Values() <-chan Value
|
||||
Root() Node
|
||||
Size() uint64
|
||||
Height() uint8
|
||||
Has(key Key) bool
|
||||
Get(key Key) Value
|
||||
Hash() (ByteSlice, uint64)
|
||||
Save()
|
||||
Put(Key, Value) bool
|
||||
Remove(Key) (Value, error)
|
||||
Copy() Tree
|
||||
Traverse(func(Node) bool)
|
||||
Values() <-chan Value
|
||||
}
|
||||
|
||||
func NotFound(key Key) error {
|
||||
return fmt.Errorf("Key was not found.")
|
||||
return fmt.Errorf("Key was not found.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user