-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the trieLeavesRetriever to the stateComponents
- Loading branch information
1 parent
78b58db
commit 34cae32
Showing
10 changed files
with
100 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package leavesRetriever | ||
|
||
import "context" | ||
|
||
type disabledLeavesRetriever struct{} | ||
|
||
// NewDisabledLeavesRetriever creates a new disabled leaves retriever | ||
func NewDisabledLeavesRetriever() *disabledLeavesRetriever { | ||
return &disabledLeavesRetriever{} | ||
} | ||
|
||
// GetLeaves returns an empty map and a nil byte slice for this implementation | ||
func (dlr *disabledLeavesRetriever) GetLeaves(_ int, _ []byte, _ []byte, _ context.Context) (map[string]string, []byte, error) { | ||
return make(map[string]string), []byte{}, nil | ||
} | ||
|
||
// IsInterfaceNil returns true if there is no value under the interface | ||
func (dlr *disabledLeavesRetriever) IsInterfaceNil() bool { | ||
return dlr == nil | ||
} |