Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bitcoin/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,17 @@ def unlockwallet(self, password, timeout=60):
r = self._call('walletpassphrase', password, timeout)
return r

def getblocktemplate(self, params=None):
"""return a candidate block
this implementation (and parameter) implements the the bitcoin-cli getblocktemplate
default behavior
FIXME: implement options
"""
if params is None:
params = {"rules": ["segwit"]}
r = self._call("getblocktemplate", params)
return r

def _addnode(self, node, arg):
r = self._call('addnode', node, arg)
return r
Expand Down