()
| 104 | } |
| 105 | |
| 106 | func (dt DagTree) AllDAGElements() []smartpool.Word { |
| 107 | if dt.finalized { |
| 108 | result := []smartpool.Word{} |
| 109 | branches := dt.Branches() |
| 110 | for _, k := range dt.Indices() { |
| 111 | // p := branches[k] |
| 112 | // fmt.Printf("Index: %d\nRawData: %s\nHashedData: %s\n", k, hex.EncodeToString(p.RawData[:]), proofs[k].HashedData.Hex()) |
| 113 | result = append(result, branches[k].RawData.(smartpool.Word)) |
| 114 | } |
| 115 | return result |
| 116 | } |
| 117 | panic("SP Merkle tree needs to be finalized by calling mt.Finalize()") |
| 118 | } |
no test coverage detected