-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c337b5
commit b23bb66
Showing
2 changed files
with
76 additions
and
121 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
package paymail | ||
|
||
type BUMPTx struct { | ||
hash string | ||
txId bool | ||
duplicate bool | ||
} | ||
|
||
type BUMP []map[uint64]string | ||
type BUMPMap []map[string]BUMPTx | ||
|
||
type BUMPSlice []BUMP | ||
type BUMPSlice []BUMPMap | ||
|
||
type BUMP struct { | ||
blockHeight uint64 | ||
path BUMPSlice | ||
} | ||
|
||
func (b BUMPMap) calculateMerkleRoots() ([]string, error) { | ||
merkleRoots := make([]string, 0) | ||
|
||
for tx, offset := range cmp[len(cmp)-1] { | ||
merkleRoot, err := calculateMerkleRoot(tx, offset, cmp) | ||
if err != nil { | ||
return nil, err | ||
} | ||
merkleRoots = append(merkleRoots, merkleRoot) | ||
} | ||
return merkleRoots, nil | ||
} |
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