Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Added test for whatsonchain requirements check
Browse files Browse the repository at this point in the history
  • Loading branch information
icellan committed Jun 27, 2022
1 parent 714ae0f commit 85f9c7b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chainstate/requirements_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ func Test_checkRequirement(t *testing.T) {
assert.Equal(t, true, success)
})

t.Run("found in mempool - whatsonchain", func(t *testing.T) {
success := checkRequirement(requiredInMempool, onChainExample1TxID, &TransactionInfo{
BlockHash: "",
BlockHeight: 0,
Confirmations: 0,
ID: onChainExample1TxID,
MinerID: "",
Provider: "whatsonchain",
})
assert.Equal(t, true, success)
})

t.Run("not in mempool - mAPI", func(t *testing.T) {
success := checkRequirement(requiredInMempool, onChainExample1TxID, &TransactionInfo{
BlockHash: "",
Expand Down

0 comments on commit 85f9c7b

Please sign in to comment.