mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 06:06:49 +00:00
[NOD-470] Pass string instead of hash to controller (#496)
This commit is contained in:
parent
9a510e2e23
commit
6725742d2c
@ -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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user