take out the printf from main
Merge branch 'michael-0921' of http://github.com/mastercoin-msc/mastercore into michael-0921
temp save, pre-move of unit code
Merge branch 'michael-0921' of http://github.com/mastercoin-msc/mastercore into michael-0921

update
added p2sh as an acceptable ouput type pending a block on which to release the feature
* Added the concept of a redeemAddress which is optional on send_MP and send_to_owners, if set it will take the place of the senders address as the first address in a class B.  This is so that sender addresses which are not pubkeys (aka p2sh addresses) can designate an alternative address to redeem the bitcoins as only public keys are allowed in a multisig output
* Added a test script based on handy regtest scripts from @faizkhan00
* refactored send_INTERNAL_1packet and ClassB_send moving most of the encoding logic into the ClassB_send
* ClassB_send can now take an arbitrary byte vector as a raw packet of master protocol data, it will divide this into chunks for multisig outputs, pad where necessary, obfuscate them and handle all the other stuff like sequence numbers and ecdsa code points.  Most of this was already around in various forms
* Added a new RPC call that can take an arbitrary hexadecimal string along with addresses and construct a master protocol transaction for the network.  There is no error checking on the contents of this string and it basically becomes a thin wrapper for a generic ClassB_send
* fixed an issue with a fresh copy of mastercore not properly initializing the sp database due to the lazy init on the genesis block being called before mastercore_init
* added a script to illustrate a raw tx
Fix strToInt64 function and add unit tests
Managed script + generator
Merge branch 'michael-0921' of http://github.com/mastercoin-msc/mastercore into michael-0921

getting the latest
Merge pull request #107 from zathras-crypto/updateRPC

Fix strToInt64 function and add unit tests
Merge branch 'reorg-mitigation' of github.com:wanderingbort/mastercore into reorg-mitigation
Small fixes
Final script managed
revert input change
Add method to determine dust limit

Get minimum output amount to be spent by an output based on scriptPubKey size in relation to the minimum relay fee.

The minimum relay fee can be defined as command-line argument `-minrelayfee=<amount>` or `minrelayfee=<amount>` in bitcoin.conf.

As per default `minrelayfee=0.00001` is used which results in the following dust limits:

- Pay-to-pubkey-hash (34 byte): 0.00000546 BTC
- Multisig, two compressed public keys (80 byte): 0.00000684 BTC
- Multisig, one compressed, one uncompressed public key (112 byte): 0.00000780 BTC
- Multisig, three compressed public keys (114 byte): 0.00000786 BTC
- Multisig, one uncompressed, two compressed public keys (146 byte): 0.00000882 BTC

Related:

- core.h: bool IsDust(int64_t nMinRelayTxFee)
- init.cpp: int64_t CTransaction::nMinRelayTxFee
Use dust limit, set sane default tx fee, use minrelayfee as marker

1. `GetDustLimit(const CScript&)` is used instead of `MP_DUST_LIMIT`. See 426592e287f79b37fbdddb5cad14ce9bf2ca1317 for additional details.

2. `nMinRelayTxFee` was set to 1001 which results in output amounts of:
 - 552 (pay-to-pubkey-hash)
 - 685 (multisig, two compressed public keys)
 - 781 (multisig, one uncompressed, one compressed public key)
 - 787 (multisig, three compressed public keys)
 - 883 (multisig, one uncompressed, two compressed public keys)

Set this value to 10000 to mirror the old "6000 / packet rule" with slightly tighter (and more accurate) amounts.

The default value was set to 1000 back in November 2013, so this amount should be safe. +1 Satoshi is used as marker. Increment further, if a new marker is needed.

The `minrelaytxfee` can be set via bitcoin.conf or startup parameter. Note: `minrelaytxfee=0.00001001` in decimal form must used! Verify via `getinfo` and look out for `relayfee`.

3. `DEFAULT_TRANSACTION_FEE` was set to 10000 from 0.

This simply mirrors the actual default value and has no effect, unless the mintxfee is overwritten. In this case all it does is to act as safeguard for the case that only `mintxfee` was set and `paytxfee` was forgotten.
Add revoke/grant script
Merge branch 'michael-0921' of http://github.com/mastercoin-msc/mastercore into michael-0921

updating locally