Skip to content

Commit

Permalink
client/asset/btc: expose spv scanFilters method
Browse files Browse the repository at this point in the history
  • Loading branch information
itswisdomagain authored and ukane-philemon committed Jul 2, 2024
1 parent aaebd5e commit b367a55
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 246 deletions.
9 changes: 7 additions & 2 deletions client/asset/btc/btc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcwallet/wallet"
)

var (
Expand Down Expand Up @@ -184,7 +185,7 @@ type testData struct {
// spv
fetchInputInfoTx *wire.MsgTx
getCFilterScripts map[chainhash.Hash][][]byte
checkpoints map[OutPoint]*scanCheckpoint
checkpoints map[OutPoint]*ScanCheckpoint
confs uint32
confsSpent bool
confsErr error
Expand All @@ -211,12 +212,16 @@ func newTestData() *testData {
fetchInputInfoTx: dummyTx(),
getCFilterScripts: make(map[chainhash.Hash][][]byte),
confsErr: WalletTransactionNotFound,
checkpoints: make(map[OutPoint]*scanCheckpoint),
checkpoints: make(map[OutPoint]*ScanCheckpoint),
tipChanged: make(chan asset.WalletNotification, 1),
getTransactionMap: make(map[string]*GetTransactionResult),
}
}

func (c *testData) GetTransactions(startHeight, endHeight int32, accountName string, cancel <-chan struct{}) (*wallet.GetTransactionsResult, error) {
return nil, fmt.Errorf("not implemented")
}

func (c *testData) getBlock(blockHash chainhash.Hash) *msgBlockWithHeight {
c.blockchainMtx.Lock()
defer c.blockchainMtx.Unlock()
Expand Down
Loading

0 comments on commit b367a55

Please sign in to comment.