Skip to content

Commit

Permalink
Allow disabling block proposals entirely with TemplateChecks=None
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Jun 22, 2015
1 parent 0daf6a0 commit 2570c30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ TemplateSources = (
)

# JSON-RPC servers to check block proposals with
# If none provided, and selected source supports proposals, it alone will also
# be used for checking
# If the list provided is empty, and selected source supports proposals, it
# alone will be used for checking. If TemplateChecks is None, no checking will
# ever be performed.
# NOTE: Any servers listed here MUST support BIP 23 Block Proposals
# NOTE: Mainline bitcoind (as of 0.8) does NOT support this (though the 0.8.0.eligius branch does)
TemplateChecks = (
Expand Down
2 changes: 1 addition & 1 deletion merklemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def _ProcessGBT(self, MP, TS = None):
def _CheckTemplate(self, newMerkleTree, TS):
TCList = self.TemplateChecks
if not TCList:
if 'proposal' not in newMerkleTree.oMP.get('capabilities', ()):
if TCList is None or 'proposal' not in newMerkleTree.oMP.get('capabilities', ()):
return (None, None)
TCList = (
{
Expand Down

0 comments on commit 2570c30

Please sign in to comment.