Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omni_funded_send fail #795

Closed
Laizhongsheng opened this issue Oct 15, 2018 · 13 comments
Closed

omni_funded_send fail #795

Laizhongsheng opened this issue Oct 15, 2018 · 13 comments

Comments

@Laizhongsheng
Copy link

I use omni_funded_send to transfer usdt, but fail:
[]#omnicore-cli omni_funded_send "14r9FgrbXfseDcYaE2GuDQjbLuTY4ehZZ7" "14r9FgrbXfseDcYaE2GuDQjbLuTY4ehZZ7" 31 "0.001" "1PRvBopKSQBCD3P8e2RQ1eLTukZCCczSgW"
error code: -212
error message:
Error choosing inputs for the send transaction

omnicore.log shows "CreateFundedTransaction: ERROR: sender 1CSbGg9gD2rp6rcYcwrfNsgiTEpgaFygYz has no coins "

However, If transfer to same address ,it works,

[]#omnicore-cli omni_funded_send "14r9FgrbXfseDcYaE2GuDQjbLuTY4ehZZ7" "14r9FgrbXfseDcYaE2GuDQjbLuTY4ehZZ7" 31 "0.001" "1NCtyNY5idbc2WBYYsfea2sTmtyyoDHDZ5"

Txid: 5b702fb27caa195b4ab012a4ed1cf234ba10caaba20e4ecb90504c795c266ecf

[]# omnicore-cli omni_funded_send "14r9FgrbXfseDcYaE2GuDQjbLuTY4ehZZ7" "14r9FgrbXfseDcYaE2GuDQjbLuTY4ehZZ7" 31 "0.0001"

Txid: "1NCtyNY5idbc2WBYYsfea2sTmtyyoDHDZ5"

Please help me. @dexX7

@Laizhongsheng
Copy link
Author

Anyone hlep me, thanks..

@Laizhongsheng
Copy link
Author

If restart omnicore, it works one time, do it again then fail.

  1. omnicore-cli omni_funded_send "17MqvgDzqqZnZiuVivWMG1ZrY1b9vxkcwo" "1B33ai7aJythhNYLuZ8i1KmC21fZUJTTBf" 31 0.001 "1NCtyNY5idbc2WBYYsfea2sTmtyyoDHDZ5"

Tx: bb989c1933c5e2314549578507617371b25e03208e1196319aab3172b4567a09

  1. omnicore-cli omni_funded_send "17MqvgDzqqZnZiuVivWMG1ZrY1b9vxkcwo" "1B33ai7aJythhNYLuZ8i1KmC21fZUJTTBf" 31 0.001 "1NCtyNY5idbc2WBYYsfea2sTmtyyoDHDZ5"

error code: -212
error message:
Error choosing inputs for the send transaction

@hungnvd59
Copy link

@dexX7 I am also experiencing this problem. If you have a solution please help me! thanks you!

@qinly
Copy link

qinly commented Oct 16, 2018

+1 #791

@Jackluren
Copy link

Anyone can solve this problem ?

@hungnvd59
Copy link

@dexX7 help me

@ghost
Copy link

ghost commented Oct 22, 2018

I guess you receiving this messsage because the from ( from, not the feefrom ) have 0 balance in BTC, you need some balance in BTC in from to create a transaction.
I followed the steps to reproduce the problem:
Transfer 20 usdt to address X.
Now my usdt balance is 20 and BTC balance is 0.00000546 in address X.
Send omnicore-cli omni_funded_send "X" "SomeAddress" 31 "1" "Y", now the balance of X is 19 usdt and 0 btc.
If you repeat the same transfer, you got the error:
error code: -212
error message:
Error choosing inputs for the send transaction

But If you transfer some btc to address X ( 0.0005 for example ) , you can repeat the transfer without problem.

@Laizhongsheng
Copy link
Author

@marucelo Fail still.
Reproduct, both BTC and USDT balance is enough.

omni_funded_send "1KBZqsy22w8AJ2dPuYMc4W3hykosWey98R" "16ovigXQdfPsbUCm9BYNGjFL31cNXTkduE" 31 0.6 "1MaLGJYdXSDva7zPkLaEBmugX7JSvjhXNT"
error code: -212
error message:
Error choosing inputs for the send transaction

1KBZqsy22w8AJ2dPuYMc4W3hykosWey98R
0 BTC 0 0.00000546
31 TetherUS 0 1.6

1MaLGJYdXSDva7zPkLaEBmugX7JSvjhXNT
0 BTC 0 0.002

@ghost
Copy link

ghost commented Oct 23, 2018

I just made the tests again:

3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ 0 BTC BALANCE

omnicore-cli omni_funded_send "3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ" "1BNY3BKk6AhWNq8iYrCuJxiNMtHHSGbg4o" 31 "3" "3AJyCVDv5Nb55tpCnMxYxsqc3cAYQXZWEP"
error code: -212
error message:
Error choosing inputs for the send transaction

Send 0.0005 BTC to 3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ

omnicore-cli sendtoaddress "3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ" 0.0005 "" "" true
8a9dc033dbaeb2bd14da8d0fa2511df0d3aefcc3f3b38d08bd75bbd56345ab91

3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ 0.0005 BTC BALANCE

omnicore-cli omni_funded_send "3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ" "1BNY3BKk6AhWNq8iYrCuJxiNMtHHSGbg4o" 31 3 "3AJyCVDv5Nb55tpCnMxYxsqc3cAYQXZWEP"
638326fd4e8e5b55049519ad6e950fc241fcbb052fa4fcd30dd13ad20a78e31a

3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ 0 BTC BALANCE

omnicore-cli omni_funded_send "3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ" "1BNY3BKk6AhWNq8iYrCuJxiNMtHHSGbg4o" 31 3 "3AJyCVDv5Nb55tpCnMxYxsqc3cAYQXZWEP"
error code: -212
error message:

Send 0.0005 BTC to 3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ

omnicore-cli sendtoaddress "3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ" 0.0005 "" "" true
a21fe1cd97f4a742a7c818b6713792644b4a5d8c27b2cba52d39f8a8829cf5a6

3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ 0.0005 BTC BALANCE

omnicore-cli omni_funded_send "3BMEtyRXqVGRujANXNEXyTZ3tY3kRqraQQ" "1BNY3BKk6AhWNq8iYrCuJxiNMtHHSGbg4o" 31 3 "3AJyCVDv5Nb55tpCnMxYxsqc3cAYQXZWEP"
9a059be5ba8604a88aeaaeafe244314ce96cb6b8af675f9067661455470e066b

Please, can you run omnicore-cli listunspent 0 9999999 and send the output?

@Laizhongsheng
Copy link
Author

I try again. Thanks.

@Laizhongsheng
Copy link
Author

@marucelo Thank you very very much.

Marucelo solve my problem.

@huahuayu
Copy link

@marucelo why you use omni_funded_send but not omni_send, is it because you want specific the txfee paid by another address(which is different than sender)? I have a test by omni_send and I encounter the same error you meet @Laizhongsheng. The sender have enough BTC & omni asset, can you please take a look? #807

@blueambition
Copy link

blueambition commented Jun 4, 2019

@Laizhongsheng omnicore.log shows "CreateFundedTransaction: ERROR: sender 1CSbGg9gD2rp6rcYcwrfNsgiTEpgaFygYz has no coins "
@marucelo
you can get balance using "listunspent", but you must sum all unspent amount per an address.
not ./omnicore-cli -testnet getbalance address。

https://bitcoin.stackexchange.com/questions/10090/how-to-get-an-addresss-balance-with-the-bitcoin-client
The concept of an "address balance" is based on confusion.
The way Bitcoin is designed, there are three different concepts related: addresses, wallets, and accounts. Wallets are comprised of one or more accounts, each having a balance (which may even be negative). The wallet as a whole has a balance totalling the sum of all accounts (which must always be positive).

Addresses are merely entry points to a wallet; they do not have balances, and should only ever* be used once. Addresses are associated with an account: when coins are received on the address, it credits that account - note that this is a one-way association: the account is not associated with the address, nor the coin received; its balance is simply increased by the amount received. When you spend bitcoins, your wallet chooses coins to spend at (more or less) random, with no concern for how they were received, and will usually use a completely new invisible address internally with itself, that you will not see as an end-user. Overall, these are some of the reasons why it makes little sense to talk about an "address balance".

  • While it is fairly common that people reuse addresses for deposits or donations, doing so is harmful to yourself and others using Bitcoin in a number of ways which are outside the scope of this question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants