(count int32)
| 81 | } |
| 82 | |
| 83 | func (n *blockNode) ancestorByCount(count int32) (ancestor *blockNode) { |
| 84 | if count < 0 || count > n.count { |
| 85 | return nil |
| 86 | } |
| 87 | |
| 88 | for ancestor = n; ancestor != nil && ancestor.count > count; ancestor = ancestor.parent { |
| 89 | } |
| 90 | |
| 91 | if ancestor != nil && ancestor.count < count { |
| 92 | ancestor = nil |
| 93 | } |
| 94 | |
| 95 | return |
| 96 | } |
| 97 | |
| 98 | func (n *blockNode) indexKey() (key []byte) { |
| 99 | key = make([]byte, hash.HashSize+4) |