Bitcoin Forum
December 14, 2017, 03:51:10 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: transaction create and signing  (Read 663 times)
Nelzat
Newbie
*
Offline Offline

Activity: 20


View Profile
November 18, 2015, 09:29:37 AM
 #1

Hi everyone

I am trying to run the code to create a transaction on Armory using a python script  found in
https://github.com/etotheipi/BitcoinArmory/blob/master/extras/createTxFromAddrList.py, instead of the GUI.

I am getting the following errors,

1.RuntimeError: Cannot start transaction without db env

2.Segmentation fault (core dumped)

3.TypeError: UnspentTxOut_getNumConfirm() takes exactly 2 arguments (1 given)


Has anybody encountered the same problem?

Please aid and thank you very much.

1513266670
Hero Member
*
Offline Offline

Posts: 1513266670

View Profile Personal Message (Offline)

Ignore
1513266670
Reply with quote  #2

1513266670
Report to moderator
1513266670
Hero Member
*
Offline Offline

Posts: 1513266670

View Profile Personal Message (Offline)

Ignore
1513266670
Reply with quote  #2

1513266670
Report to moderator
1513266670
Hero Member
*
Offline Offline

Posts: 1513266670

View Profile Personal Message (Offline)

Ignore
1513266670
Reply with quote  #2

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

Activity: 1694

Armory Developer


View Profile
November 18, 2015, 10:15:39 AM
 #2

1. You have to initialize the DB before you query it

2. That's what will happen if you pass a null DB pointer

3. UnspentTxOut.getNumConfirm(blockNum)

Nelzat
Newbie
*
Offline Offline

Activity: 20


View Profile
November 18, 2015, 11:57:36 AM
 #3

Hi goatPig

Thanks

1.You have to initialize the DB before you query it, I am running the Armory GUI too, which means the DB is initialized already, at least that is what i think.
or is there another way to do it?

2. That's what will happen if you pass a null DB pointer

3. The UnspentTxOut.getNumConfirm is in the Coinselection.py and if i add,(blockNum), it is undefined. Its a variable from nowhere
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 1694

Armory Developer


View Profile
November 18, 2015, 01:56:23 PM
 #4

Hi goatPig

Thanks

1.You have to initialize the DB before you query it, I am running the Armory GUI too, which means the DB is initialized already, at least that is what i think.
or is there another way to do it?

2. That's what will happen if you pass a null DB pointer

3. The UnspentTxOut.getNumConfirm is in the Coinselection.py and if i add,(blockNum), it is undefined. Its a variable from nowhere

1. These are different processes altogether. The DB exists as a shared library within each process address space. You have to init the DB properly in Python process you are running your script from. Probably something is going wrong at this line:

https://github.com/etotheipi/BitcoinArmory/blob/master/armoryengine/BDM.py#L228https://github.com/etotheipi/BitcoinArmory/blob/master/extras/createTxFromAddrList.py#L38

2. Not sure what you mean by repeating the sentence

3. I meant blockNum as in any block height as integer. You can't figure out the number of confirmations a transaction has without specifying from which block height. By default, you should use TheBDM.getTopBlockHeight():

https://github.com/etotheipi/BitcoinArmory/blob/master/armoryengine/BDM.py#L228

Nelzat
Newbie
*
Offline Offline

Activity: 20


View Profile
December 03, 2015, 05:22:52 PM
 #5

Hi goatpig

Thanks a lot, you actually helped me to figure out the problem.
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!