contrib/spendfrom.py spends coins from a particular address or addresses#2155
contrib/spendfrom.py spends coins from a particular address or addresses#2155gavinandresen wants to merge 1 commit intobitcoin:masterfrom
Conversation
Should be both useful and also a pretty good demonstration of using the raw transactions API.
|
In my own python scripts I've never been clear about this— and hand't bothered to try to test it— can the cast from Decimal to float and then transmission to bitcoind result in turning 1e-8 BTC to fees due to rounding? |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/72bb8e1b3498a79702e47c2e64895f3b29f9ee45 for binaries and test log. |
|
Cast from Decimal to float will be safe as long as floats are 64 bits. Checking for that is a good idea: "information about the precision and internal representation of floating point numbers for the machine on which your program is running is available in sys.float_info." ... or maybe more straightforward (and more easily portable to other languages) would be a check routine that takes Decimal("20000000.00000003"), converts it to float, json encode/decode, and makes sure precision is not lost in the round-trip. mmm, yeah, json encode/decode definitely better, because the json float encoder might decide to round/truncate... |
|
Closing this for now; I found a nasty bug doing more testing (on testnet-- using same address as input and output could lose coins to fees). I'm going to rework to sanity-check fees on the final transaction and write a test plan. |
* Update release notes * add 2157
* MAZA-POS: (5575 commits) Mazafication of code More mazafication More mazafications and compile correction fixes fix for build issues fix for build issues fix string in net.cpp correct pow.cpp correct validation.cpp fixing for build errors fix typo Merge remote-tracking branch 'origin/MAZA-POS' into MAZA-POS merge to dash rebase Release notes 0.12.3.3 Remove redundant parameter fCheckDuplicateInputs from CheckTransaction Fix crash bug with duplicate inputs within a transaction Bump to 0.12.3.3 Release notes 0.12.3.2 (bitcoin#2174) Add tests for special rules for slow blocks on devnet/testnet (bitcoin#2176) Allow mining min diff for very slow (2h+) blocks (bitcoin#2175) Fix issues with selections on Masternode tab (bitcoin#2170) Sync mn list and mnw list from 3 peers max (bitcoin#2169) A few devnet related fixes (bitcoin#2168) Adjust diff for slow testnet/devnet blocks a bit smoother (bitcoin#2161) Make PS Buttons not react to spacebar (bitcoin#2154) Bump to 0.12.3.2 (bitcoin#2173) Bump to 0.12.3.1 (bitcoin#2158) Update release notes (bitcoin#2155) Use correct protocol when serializing messages in reply to `getdata` (bitcoin#2157) Fix p2pkh tests asserts (bitcoin#2153) Fix block value/payee validation in lite mode (bitcoin#2148) ...
This is 'a python geeks coin control.'
Should be both useful and also a good demonstration of using the raw transactions API.