GetBlocksFromHash returns the block corresponding to hash and up to n-1 ancestors. [deprecated by eth/62]
(hash common.Hash, n int)
| 754 | // GetBlocksFromHash returns the block corresponding to hash and up to n-1 ancestors. |
| 755 | // [deprecated by eth/62] |
| 756 | func (bc *BlockChain) GetBlocksFromHash(hash common.Hash, n int) (blocks []*types.Block) { |
| 757 | number := bc.hc.GetBlockNumber(hash) |
| 758 | if number == nil { |
| 759 | return nil |
| 760 | } |
| 761 | for i := 0; i < n; i++ { |
| 762 | block := bc.GetBlock(hash, *number) |
| 763 | if block == nil { |
| 764 | break |
| 765 | } |
| 766 | blocks = append(blocks, block) |
| 767 | hash = block.ParentHash() |
| 768 | *number-- |
| 769 | } |
| 770 | return |
| 771 | } |
| 772 | |
| 773 | // TrieNode retrieves a blob of data associated with a trie node (or code hash) |
| 774 | // either from ephemeral in-memory cache, or from persistent storage. |
nothing calls this directly
no test coverage detected