Skip to content

Commit

Permalink
Consolidate settings in constants.py to eliminate redundancies in sid…
Browse files Browse the repository at this point in the history
…echain-manipulation.py

045b310 Import settings from constants.py into sidechain-manipulation.py

b698a88 Restore original value of secondScriptPubKey to sidechain-manipulation.py

7474a1c Update alpha-README.md - edit RPC info in constants.py instead of sidechain-manipulation.py
  • Loading branch information
TomMcCabe committed May 11, 2016
1 parent df4c512 commit a9773e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alpha-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for notes on dependencies that must be installed before beginning.
```bash
git clone https://github.com/jgarzik/python-bitcoinrpc
```
5\. Edit sidechain-manipulation.py (replace `user:pass` with your RPC username and password):
5\. Edit contrib/fedpeg/constants.py (replace `user:pass` with your RPC username and password):
```python
# VARIOUS SETTINGS...
sidechain_url = "http://user:[email protected]:4241"
Expand Down
12 changes: 8 additions & 4 deletions contrib/sidechain-manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../python-bitcoinrpc"))
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from decimal import *
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "fedpeg/"))
from constants import FedpegConstants

# Command line arguments
parser = argparse.ArgumentParser(description = 'Script that accommodates the ' \
Expand Down Expand Up @@ -50,12 +52,14 @@
args = parser.parse_args()

# VARIOUS SETTINGS...
sidechain_url = "http://user:[email protected]:4241"
bitcoin_url = "http://user:[email protected]:18332"
settings = FedpegConstants

redeem_script = "55210269992fb441ae56968e5b77d46a3e53b69f136444ae65a94041fc937bdb28d93321021df31471281d4478df85bfce08a10aab82601dca949a79950f8ddf7002bd915a2102174c82021492c2c6dfcbfa4187d10d38bed06afb7fdcd72c880179fddd641ea121033f96e43d72c33327b6a4631ccaa6ea07f0b106c88b9dc71c9000bb6044d5e88a210313d8748790f2a86fb524579b46ce3c68fedd58d2a738716249a9f7d5458a15c221030b632eeb079eb83648886122a04c7bf6d98ab5dfb94cf353ee3e9382a4c2fab02102fb54a7fcaa73c307cfd70f3fa66a2e4247a71858ca731396343ad30c7c4009ce57ae"
sidechain_url = settings.sidechain_url
bitcoin_url = settings.bitcoin_url

redeem_script = settings.redeem_script
secondScriptPubKeyHash = settings.secondScriptPubKeyHash
secondScriptPubKey = "OP_DROP 144 OP_LESSTHANOREQUAL"
secondScriptPubKeyHash = "9eac001049d5c38ece8996485418421f4a01e2d7"

#Bitcoin:
bitcoin_genesis_hash = "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
Expand Down

0 comments on commit a9773e8

Please sign in to comment.