()
| 124 | } |
| 125 | |
| 126 | func (amt AugTree) CounterBranchArray() []*big.Int { |
| 127 | if amt.finalized { |
| 128 | result := []*big.Int{} |
| 129 | branches := amt.Branches() |
| 130 | var node AugData |
| 131 | for _, k := range amt.Indices() { |
| 132 | nodes := branches[k].ToNodeArray()[1:] |
| 133 | for _, n := range nodes { |
| 134 | node = n.(AugData) |
| 135 | be := smartpool.BranchElement{} |
| 136 | copy(be[:], node.CounterBytes()) |
| 137 | result = append(result, be.Big()) |
| 138 | } |
| 139 | } |
| 140 | return result |
| 141 | } |
| 142 | panic("SP Merkle tree needs to be finalized by calling mt.Finalize()") |
| 143 | } |
| 144 | |
| 145 | func (amt AugTree) HashBranchArray() []*big.Int { |
| 146 | if amt.finalized { |
no test coverage detected