Skip to content

Commit

Permalink
Merge pull request btcsuite#19 from mit-dci/no-utxocache-for-utreexo-…
Browse files Browse the repository at this point in the history
…node

btcutil: Make btcutil part of the btcd repo
  • Loading branch information
kcalvinalvin authored Nov 8, 2021
2 parents 9b19805 + f08366e commit a0a1645
Show file tree
Hide file tree
Showing 190 changed files with 17,972 additions and 105 deletions.
2 changes: 1 addition & 1 deletion blockchain/accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package blockchain
import (
"fmt"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcutil"
)

// maybeAcceptBlock potentially accepts a block into the block chain and, if
Expand Down
2 changes: 1 addition & 1 deletion blockchain/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package blockchain
import (
"testing"

"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcd/btcutil"
)

// BenchmarkIsCoinBase performs a simple benchmark against the IsCoinBase
Expand Down
2 changes: 1 addition & 1 deletion blockchain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"sync"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"testing"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

// TestHaveBlock tests the HaveBlock API to ensure proper functionality.
Expand Down
2 changes: 1 addition & 1 deletion blockchain/chainio.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"sync"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/checkpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"fmt"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcutil"
)

// CheckpointConfirmations is the number of blocks before the end of the current
Expand Down
2 changes: 1 addition & 1 deletion blockchain/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import (
"strings"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
_ "github.com/btcsuite/btcd/database/ffldb"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"path/filepath"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/database"
_ "github.com/btcsuite/btcd/database/ffldb"
"github.com/btcsuite/btcutil"
)

// This example demonstrates how to create a new chain instance and use
Expand Down
2 changes: 1 addition & 1 deletion blockchain/fullblocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import (

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/blockchain/fullblocktests"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
_ "github.com/btcsuite/btcd/database/ffldb"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/fullblocktests/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/indexers/addrindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"sync"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/indexers/blocklogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btclog"
"github.com/btcsuite/btcutil"
)

// blockProgressLogger provides periodic logging for other services in order
Expand Down
6 changes: 3 additions & 3 deletions blockchain/indexers/cfindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"errors"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/btcutil/gcs"
"github.com/btcsuite/btcd/btcutil/gcs/builder"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/gcs"
"github.com/btcsuite/btcutil/gcs/builder"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/indexers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"errors"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcutil"
)

var (
Expand Down
5 changes: 2 additions & 3 deletions blockchain/indexers/flatutreexoproofindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import (
"sync"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/mit-dci/utreexo/accumulator"
"github.com/mit-dci/utreexo/util"
)

const (
Expand Down Expand Up @@ -130,7 +129,7 @@ func (idx *FlatUtreexoProofIndex) ConnectBlock(dbTx database.Tx, block *btcutil.
return nil
}

_, outCount, inskip, outskip := util.DedupeBlock(block)
_, outCount, inskip, outskip := blockchain.DedupeBlock(block)
dels, err := blockchain.BlockToDelLeaves(stxos, idx.chain, block, inskip)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion blockchain/indexers/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"fmt"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/indexers/ttlindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package indexers

import (
"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/indexers/txindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"fmt"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
5 changes: 2 additions & 3 deletions blockchain/indexers/utreexoproofindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import (
"sync"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/mit-dci/utreexo/accumulator"
"github.com/mit-dci/utreexo/util"
)

const (
Expand Down Expand Up @@ -127,7 +126,7 @@ func (idx *UtreexoProofIndex) ConnectBlock(dbTx database.Tx, block *btcutil.Bloc
return nil
}

_, outCount, inskip, outskip := util.DedupeBlock(block)
_, outCount, inskip, outskip := blockchain.DedupeBlock(block)
dels, err := blockchain.BlockToDelLeaves(stxos, idx.chain, block, inskip)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion blockchain/merkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"fmt"
"math"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcutil"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blockchain/merkle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package blockchain
import (
"testing"

"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcd/btcutil"
)

// TestMerkle tests the BuildMerkleTreeStore API.
Expand Down
2 changes: 1 addition & 1 deletion blockchain/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"fmt"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/database"
"github.com/btcsuite/btcutil"
)

// BehaviorFlags is a bitmask defining tweaks to the normal behavior when
Expand Down
2 changes: 1 addition & 1 deletion blockchain/scriptval.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"runtime"
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)

// txValidateItem holds a transaction along with which input to validate.
Expand Down
Loading

0 comments on commit a0a1645

Please sign in to comment.