Author

Topic: Sign raw transaction testnet3 issue (Read 709 times)

legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
July 01, 2015, 09:44:43 AM
#4
yes you are right. it is Java RCP open source library.
I have checked same operation into QT console. All works well.
Does bitcoin has some additional RCP WEB services ?

I think that in a newer version of bitcoin-core you can use XML rather than JSON RPC commands.  Do you keep saying RCP as a typo?  Or is that distinct from RPC?

If you find that you can send the commands via command-line then it seems like the issue is in your Java package.  Can you print the output of your Java program to stdout so that you can see that it's well formed?  Also, it sounds like it's not bitcoind that freezes but your Java program.  I think you need to disentangle the layers of control here in order to get somewhere on debugging.
jr. member
Activity: 43
Merit: 7
July 01, 2015, 02:14:00 AM
#3
yes you are right. it is Java RCP open source library.
I have checked same operation into QT console. All works well.
Does bitcoin has some additional RCP WEB services ?
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
June 30, 2015, 01:00:50 PM
#2
Haven't tried this myself, but I'd check `top' to see if it's working hard (not actually frozen) and maybe there's some info in debug.log if it actually did crap out on you.

Also, I'm following-up here for my own info.  is RCP different from RPC (remote procedure control).  And what you wrote doesn't look like the typical rpc commands, it looks like Java to me.  I'm sure I'm missing something, thanks!
jr. member
Activity: 43
Merit: 7
June 30, 2015, 11:07:28 AM
#1
Hello

I am trying to use RCP with native client + testnet3

Prepared and create raw transaction


Code:
        //We save the txid and output -> bitcoin-cli -regtest getnewaddress
        String newAddress = getApi().getNewAddress();

        //bitcoin-cli -regtest createrawtransaction
        List outputList = getApi().listUnspent();
        String raw = getApi().createRawTransaction(outOverview(outputList.get(0)), destination());

        //bitcoin-cli -regtest decoderawtransaction
        //Use the decoderawtransaction RPC to see exactly what the transaction we just created does.
        RawTransactionOverview rawTransactionOverview = getApi().decodeRawTransaction(raw);

have got valid data after decodeRawTransaction

Code:
RawTransactionOverview(super=Entity(),
txId=386f447310db1eea491291d67f21d310ff586fe3367d7c7e5a4ad56e7683e178,
version=1,
lockTime=0,
vIn=[RawInput(super=Entity(),
txId=70422d040ea45a546dc60e7d5a6aa0d03e92ed7597ca261da48f52eb6d882011,
vOut=1,
scriptSig=SignatureScript(super=Entity(),
asm=,
hex=),
coinbase=null,
sequence=4294967295)],
vOut=[RawOutput(super=Entity(),
value=0.00010000,
n=0,
scriptPubKey=PubKeyScript(super=SignatureScript(super=Entity(),
asm=OP_DUPOP_HASH16068b38e95592fbee924899b8264b0391d638e41a6OP_EQUALVERIFYOP_CHECKSIG,
hex=76a91468b38e95592fbee924899b8264b0391d638e41a688ac),
reqSigs=1,
type=ScriptTypes(name=pubkeyhash),
addresses=[mq4Zfqjo9tB25jwJRc3NQPExk4mwsFRwQQ]))])
   

Try to sign tx.

Code:
SignatureResult signatureResult = getApi().signRawTransaction(raw);

bitcoind freezes. I am waiting for response ...

Any advice ?

Regards!
Jump to: