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

Commit

Permalink
feat(BUX-172): update go-paymail dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszos4chain committed Nov 24, 2023
1 parent 4b91c0f commit 17197d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions chainstate/merkle_root_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const (
// of Merkle Roots inclusion in the longest chain.
type MerkleRootConfirmationRequestItem struct {
MerkleRoot string `json:"merkleRoot"`
BlockHeight int32 `json:"blockHeight"`
BlockHeight uint64 `json:"blockHeight"`
}

// MerkleRootConfirmation is a confirmation
// of merkle roots inclusion in the longest chain.
type MerkleRootConfirmation struct {
Hash string `json:"blockHash"`
BlockHeight int32 `json:"blockHeight"`
BlockHeight uint64 `json:"blockHeight"`
MerkleRoot string `json:"merkleRoot"`
Confirmation MerkleRootConfirmationState `json:"confirmation"`
}
Expand Down
2 changes: 1 addition & 1 deletion definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
dustLimit = uint64(1) // Dust limit
mongoTestVersion = "6.0.4" // Mongo Testing Version
sqliteTestVersion = "3.37.0" // SQLite Testing Version (dummy version for now)
version = "v0.6.0" // bux version
version = "v0.6.1" // bux version
)

// Defaults for task cron jobs (tasks)
Expand Down
3 changes: 2 additions & 1 deletion paymail_mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/bitcoin-sv/go-paymail"
"github.com/bitcoin-sv/go-paymail/server"
"github.com/bitcoin-sv/go-paymail/spv"
)

// Mock implementation of a service provider
Expand Down Expand Up @@ -43,7 +44,7 @@ func (m *mockServiceProvider) RecordTransaction(_ context.Context,
}

// RecordTransaction is a demo implementation of this interface
func (m *mockServiceProvider) VerifyMerkleRoots(_ context.Context, _ []paymail.MerkleRootConfirmationRequestItem) error {
func (m *mockServiceProvider) VerifyMerkleRoots(_ context.Context, _ []*spv.MerkleRootConfirmationRequestItem) error {

// Verify merkle roots
return nil
Expand Down
3 changes: 2 additions & 1 deletion paymail_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/bitcoin-sv/go-paymail"
"github.com/bitcoin-sv/go-paymail/server"
"github.com/bitcoin-sv/go-paymail/spv"

Check failure on line 12 in paymail_service_provider.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, ubuntu-latest)

no required module provides package github.com/bitcoin-sv/go-paymail/spv; to add it:
"github.com/bitcoinschema/go-bitcoin/v2"
"github.com/libsv/go-bk/bec"
customTypes "github.com/mrz1836/go-datastore/custom_types"
Expand Down Expand Up @@ -182,7 +183,7 @@ func (p *PaymailDefaultServiceProvider) RecordTransaction(ctx context.Context,
// VerifyMerkleRoots will verify the merkle roots by checking them in external header service - Pulse
func (p *PaymailDefaultServiceProvider) VerifyMerkleRoots(
ctx context.Context,
merkleRoots []paymail.MerkleRootConfirmationRequestItem,
merkleRoots []*spv.MerkleRootConfirmationRequestItem,
) error {
request := make([]chainstate.MerkleRootConfirmationRequestItem, 0)
for _, m := range merkleRoots {
Expand Down

0 comments on commit 17197d5

Please sign in to comment.