mirror of
https://github.com/muun/recovery.git
synced 2025-11-11 14:30:19 -05:00
Release v0.3.0
This commit is contained in:
13
vendor/github.com/btcsuite/btcd/blockchain/chainio.go
generated
vendored
13
vendor/github.com/btcsuite/btcd/blockchain/chainio.go
generated
vendored
@@ -1149,18 +1149,9 @@ func (b *BlockChain) initChainState() error {
|
||||
|
||||
blockIndexBucket := dbTx.Metadata().Bucket(blockIndexBucketName)
|
||||
|
||||
// Determine how many blocks will be loaded into the index so we can
|
||||
// allocate the right amount.
|
||||
var blockCount int32
|
||||
cursor := blockIndexBucket.Cursor()
|
||||
for ok := cursor.First(); ok; ok = cursor.Next() {
|
||||
blockCount++
|
||||
}
|
||||
blockNodes := make([]blockNode, blockCount)
|
||||
|
||||
var i int32
|
||||
var lastNode *blockNode
|
||||
cursor = blockIndexBucket.Cursor()
|
||||
cursor := blockIndexBucket.Cursor()
|
||||
for ok := cursor.First(); ok; ok = cursor.Next() {
|
||||
header, status, err := deserializeBlockRow(cursor.Value())
|
||||
if err != nil {
|
||||
@@ -1193,7 +1184,7 @@ func (b *BlockChain) initChainState() error {
|
||||
|
||||
// Initialize the block node for the block, connect it,
|
||||
// and add it to the block index.
|
||||
node := &blockNodes[i]
|
||||
node := new(blockNode)
|
||||
initBlockNode(node, header, parent)
|
||||
node.status = status
|
||||
b.index.addNode(node)
|
||||
|
||||
16
vendor/github.com/btcsuite/btcd/blockchain/utxoviewpoint.go
generated
vendored
16
vendor/github.com/btcsuite/btcd/blockchain/utxoviewpoint.go
generated
vendored
@@ -111,6 +111,22 @@ func (entry *UtxoEntry) Clone() *UtxoEntry {
|
||||
}
|
||||
}
|
||||
|
||||
// NewUtxoEntry returns a new UtxoEntry built from the arguments.
|
||||
func NewUtxoEntry(
|
||||
txOut *wire.TxOut, blockHeight int32, isCoinbase bool) *UtxoEntry {
|
||||
var cbFlag txoFlags
|
||||
if isCoinbase {
|
||||
cbFlag |= tfCoinBase
|
||||
}
|
||||
|
||||
return &UtxoEntry{
|
||||
amount: txOut.Value,
|
||||
pkScript: txOut.PkScript,
|
||||
blockHeight: blockHeight,
|
||||
packedFlags: cbFlag,
|
||||
}
|
||||
}
|
||||
|
||||
// UtxoViewpoint represents a view into the set of unspent transaction outputs
|
||||
// from a specific point of view in the chain. For example, it could be for
|
||||
// the end of the main chain, some point in the history of the main chain, or
|
||||
|
||||
Reference in New Issue
Block a user