I need to know, if my transaction has been confirmed by the network.

My workflow to do this is the following:

  1. Execute a transaction
  2. By running cleos get transaction ID obtain the information
  3. According to this, determine if if "block_num" < "last_irreversible_block", and conclude if the transaction has been confirmed or not.

I am running a single node EOS blockchain locally.

nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --contracts-console 

After creating an account and pushing an action I want to obtain some information about the executed transaction, which should update some data on the ledger.

I executed the following:

cleos push action anorak update '["anorak",1,7,10]' -p anorak@active
executed transaction: 01b56d215ddeec880a9dbbd1a0660477a1069e93d7b6b74b63900c889f71f916  128 bytes  364 us
#        anorak <= anorak::update               {"account":"anorak","level":1,"healthPoints":7,"energyPoints":10}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

I see that the transaction should be part of the created block by this:

2018-09-28T13:24:45.501 thread-0 producer_plugin.cpp:1419 produce_block ] Produced block 000000c33e4c8aa5... #195 @ 2018-09-28T13:24:45.500 signed by eosio [trxs: 1, lib: 194, confirmed: 0]

But I don't see the confirmed: 1 in the logs later and when I execute:

cleos get transaction 01b56d215ddeec880a9dbbd1a0660477a1069e93d7b6b74b63900c889f71f916

I still got: Error 3040011: The transaction can not be found

1 Answer 1


Alright I was able to obtain the transaction, when I added the block number option

cleos get transaction 01b56d215ddeec880a9dbbd1a0660477a1069e93d7b6b74b63900c889f71f916 -b {block_num}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.