[NOD-470] Pass string instead of hash to controller (#496)

This commit is contained in:
Dan Aharoni 2019-11-27 17:08:23 +02:00 committed by GitHub
parent 9a510e2e23
commit 6725742d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ func GetBlocksHandler(order string, skip uint64, limit uint64) (interface{}, err
} }
// GetAcceptedTransactionIDsByBlockHashHandler returns an array of transaction IDs for a given block hash // GetAcceptedTransactionIDsByBlockHashHandler returns an array of transaction IDs for a given block hash
func GetAcceptedTransactionIDsByBlockHashHandler(blockHash *daghash.Hash) ([]string, error) { func GetAcceptedTransactionIDsByBlockHashHandler(blockHash string) ([]string, error) {
db, err := database.DB() db, err := database.DB()
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -96,7 +96,7 @@ func PublishAcceptedTransactionsNotifications(addedChainBlocks []*rpcclient.Chai
// PublishUnacceptedTransactionsNotifications publishes notification for each unaccepted transaction of the given chain-block // PublishUnacceptedTransactionsNotifications publishes notification for each unaccepted transaction of the given chain-block
func PublishUnacceptedTransactionsNotifications(removedChainHashes []*daghash.Hash) error { func PublishUnacceptedTransactionsNotifications(removedChainHashes []*daghash.Hash) error {
for _, removedHash := range removedChainHashes { for _, removedHash := range removedChainHashes {
transactionIDs, err := controllers.GetAcceptedTransactionIDsByBlockHashHandler(removedHash) transactionIDs, err := controllers.GetAcceptedTransactionIDsByBlockHashHandler(removedHash.String())
if err != nil { if err != nil {
return err return err
} }