Bitcoin Forum
August 20, 2019, 07:41:45 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sign raw transaction testnet3 issue  (Read 596 times)
init1
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
June 30, 2015, 04:07:28 PM
 #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<Output> 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!
1566330105
Hero Member
*
Offline Offline

Posts: 1566330105

View Profile Personal Message (Offline)

Ignore
1566330105
Reply with quote  #2

1566330105
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1566330105
Hero Member
*
Offline Offline

Posts: 1566330105

View Profile Personal Message (Offline)

Ignore
1566330105
Reply with quote  #2

1566330105
Report to moderator
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1053


I may write code in exchange for bitcoins.


View Profile
June 30, 2015, 06: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!
init1
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
July 01, 2015, 07: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 ?
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1053


I may write code in exchange for bitcoins.


View Profile
July 01, 2015, 02:44:43 PM
 #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.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!