Skip to content

Commit

Permalink
explain
Browse files Browse the repository at this point in the history
Signed-off-by: Darren Kellenschwiler <[email protected]>
  • Loading branch information
sirdeggen committed Nov 21, 2023
1 parent 1733c96 commit 95d91ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (bump *BUMP) Bytes() ([]byte, error) {
return bytes, nil
}

// String encodes a BUMP as a hex string.
func (bump *BUMP) String() (string, error) {
bytes, err := bump.Bytes()
if err != nil {
Expand All @@ -149,6 +150,8 @@ func (bump *BUMP) String() (string, error) {
return hex.EncodeToString(bytes), nil
}

// Txids returns the txids within the BUMP which the client is expecting.
// This allows a client to receive one BUMP for a whole block and it will know which txids it should update.
func (bump *BUMP) Txids() []string {
txids := make([]string, 0)
for _, leaf := range bump.Path[0] {
Expand Down

0 comments on commit 95d91ea

Please sign in to comment.