diff --git a/internal/blockchain/chainio.go b/internal/blockchain/chainio.go index 4c83bc59b..783bd1f97 100644 --- a/internal/blockchain/chainio.go +++ b/internal/blockchain/chainio.go @@ -1,5 +1,5 @@ // Copyright (c) 2015-2016 The btcsuite developers -// Copyright (c) 2016-2023 The Decred developers +// Copyright (c) 2016-2026 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -1693,7 +1693,7 @@ func (b *BlockChain) initChainState(ctx context.Context, // Load all of the block index entries from the database and construct // the block index. - newRulesStartTime := newDeploymentsStartTime(dbTx, b.chainParams) + newRulesStartTime = newDeploymentsStartTime(dbTx, b.chainParams) err = loadBlockIndex(dbTx, &b.chainParams.GenesisHash, b.index, newRulesStartTime) if err != nil { diff --git a/internal/blockchain/upgrade.go b/internal/blockchain/upgrade.go index 64a50c6c4..75b7bef50 100644 --- a/internal/blockchain/upgrade.go +++ b/internal/blockchain/upgrade.go @@ -1,5 +1,5 @@ // Copyright (c) 2013-2016 The btcsuite developers -// Copyright (c) 2015-2023 The Decred developers +// Copyright (c) 2015-2026 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -2631,7 +2631,8 @@ func migrateSpendJournalVersion2To3(ctx context.Context, b *BlockChain) error { } // Load the full block from the database. - blockBytes, err := dbTx.FetchBlock(&blockHash) + var blockBytes []byte + blockBytes, err = dbTx.FetchBlock(&blockHash) if err != nil { break }