Hi guys,

I face an exception "Script not of right size, expecting 2 but got 1" when 
I try to do:
tx.getInput(0).getFromAddress().toBase58()

*NB! This happens only with a very first transaction after generate 101. 
Subsequent transactions work well!*

Any ideas why it happens?

Steps to reproduce:
- bitcoind -regtest -daemon
- bitcoin-cli -regtest generate 101
- bitcoin-cli -regtest getaddressesbyaccount "" -> remember the address 
returned
- bitcoin-cli -regtest sendtoaddress <address-from-previous-step> 4.0
That's it!
Subsequent transaction works well:
- bitcoin-cli -regtest sendtoaddress <address-from-previous-step> 2.0

Code sample I took from:
https://stackoverflow.com/questions/27727439/how-to-watch-for-transactions-for-an-address-in-bitcoinj-java


String from = tx.getInput(0).getFromAddress().toBase58();


Hope you can help me.
Thank you in advance.

Best Regards,
Maksim

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to