Insufficient funds error while changing txfee

+1 vote

Hello Multichain Team,

I am getting below error whenever i change the transaction fee amount using settxfee command.

MultichainException [
                      object=code :-6.0,
                      reason=message : Insufficient funds,
                      message=null,
                      cause=null
]

1. multichain-cli chain1 settxfee 0.001 (works fine)
2. multichain-cli chain1 settxfee 0.10 (not working)

when the amount increases it will show an error while transferring the assets. when i reset the txfee amount then it works fine.
 

Could you explain why it behave like this and on what basis it will calculate the transaction fee?
Where the transaction fee would be credited and why assetref field added to address balance.
I would also like to know that how transaction fee will be calculated exactly.
Is transaction fee vary from asset to asset?

asked Mar 12, 2020 by Nikunj Dhameliya
edited Mar 12, 2020 by Nikunj Dhameliya

1 Answer

0 votes
 
Best answer

The parameter for settxfee is the amount of native currency that needs to be paid as a fee, per kilobyte of transaction size. It is not related to which particular asset is sent. Can you please use multichain-cli to show the full error message returned by MultiChain for the API you are calling?

answered Mar 13, 2020 by MultiChain
selected Apr 1, 2020 by Nikunj Dhameliya
E:\Calida\multichain-windows-2.0.5>multichain-cli chain1 settxfee 1
{"method":"settxfee","params":[1],"id":"88766136-1584333317","chain_name":"chain1"}

true

After setting up transaction fee to 1, i'm getting below error while transfer assets:

E:\Calida\multichain-windows-2.0.5>multichain-cli chain1 sendasset 14FEtZkomKDWkEqTvVz6YHiiMKBsQYqmWVyusk Coin 50
{"method":"sendasset","params":["14FEtZkomKDWkEqTvVz6YHiiMKBsQYqmWVyusk","Coin",50],"id":"34898525-1584333585","chain_name":"chain1"}

error code: -6
error message:
Insufficient funds

In case of less transaction fee, it will works fine.
How it impact on asset transfer?
The main issue is: does the node have enough balance to pay the required fee for the transaction? I think the answer is probably no, and that is why you are receiving the "Insufficient funds" error.
...