Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zcash-hackworks/ZBXCAT
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Graber committed Oct 19, 2017
2 parents fe0b50d + bd7a7f4 commit 9f01f7f
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 421 deletions.
5 changes: 2 additions & 3 deletions xcat/bitcoinRPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ def parse_secret(self, txid):
def get_keys(self, funder_address, redeemer_address):
fundpubkey = CBitcoinAddress(funder_address)
redeempubkey = CBitcoinAddress(redeemer_address)
# fundpubkey = self.bitcoind.getnewaddress()
# redeempubkey = self.bitcoind.getnewaddress()
return fundpubkey, redeempubkey

def privkey(self, address):
Expand All @@ -79,7 +77,8 @@ def hashtimelockcontract(self, funder, redeemer, commitment, locktime):
redeemerAddr = CBitcoinAddress(redeemer)
if type(commitment) == str:
commitment = x(commitment)
# h = sha256(secret)
else:
raise ValueError("Commitment was not a string: {0}".format(commitment))
blocknum = self.bitcoind.getblockcount()
print("Current blocknum on Bitcoin: ", blocknum)
redeemblocknum = blocknum + locktime
Expand Down
Loading

0 comments on commit 9f01f7f

Please sign in to comment.