diff --git a/blockchain/chainio.go b/blockchain/chainio.go index d63f26bab2..5f68ea3434 100644 --- a/blockchain/chainio.go +++ b/blockchain/chainio.go @@ -12,7 +12,7 @@ import ( "errors" "fmt" "math/big" - "sort" + "sync" "time" "github.com/decred/dcrd/blockchain/stake/v4" @@ -28,7 +28,7 @@ import ( const ( // currentDatabaseVersion indicates what the current database // version is. - currentDatabaseVersion = 8 + currentDatabaseVersion = 9 // currentBlockIndexVersion indicates what the current block index // database version. @@ -74,11 +74,11 @@ var ( // spendJournalBucketName is the name of the db bucket used to house // transactions outputs that are spent in each block. - spendJournalBucketName = []byte("spendjournalv2") + spendJournalBucketName = []byte("spendjournalv3") // utxoSetBucketName is the name of the db bucket used to house the unspent // transaction output set. - utxoSetBucketName = []byte("utxosetv2") + utxoSetBucketName = []byte("utxosetv3") // blockIndexBucketName is the name of the db bucket used to house the block // index which consists of metadata for all known blocks both in the main @@ -249,15 +249,6 @@ func readDeserializeSizeOfMinimalOutputs(serialized []byte) (int, error) { return offset, nil } -// ConvertUtxosToMinimalOutputs converts the contents of a UTX to a series of -// minimal outputs. It does this so that these can be passed to stake subpackage -// functions, where they will be evaluated for correctness. -func ConvertUtxosToMinimalOutputs(entry *UtxoEntry) []*stake.MinimalOutput { - minOuts, _ := deserializeToMinimalOutputs(entry.stakeExtra) - - return minOuts -} - // ----------------------------------------------------------------------------- // The block index consists of an entry for every known block. It consists of // information such as the block header and information about votes. @@ -481,7 +472,7 @@ func dbMaybeStoreBlock(dbTx database.Tx, block *dcrutil.Block) error { // The serialized format is: // // [