Skip to content

Commit

Permalink
contrib/signet/miner: add "coinbasetxn" capability
Browse files Browse the repository at this point in the history
  • Loading branch information
torkelrogstad committed Dec 27, 2024
1 parent dbb5590 commit 680dd0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/signet/miner
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ class Generate:
self.action_time = max(self.action_time, self.mine_time - 6900)

def gbt(self, bcli, bestblockhash, now):
tmpl = json.loads(bcli("getblocktemplate", '{"rules":["signet","segwit"]}'))
# Adding "coinbasetxn" to the capabilities field to indicate that we want
# Drivechain coinbase messages to be included in the block template.
tmpl = json.loads(bcli("getblocktemplate", '{"capabilities":["coinbasetxn"],"rules":["signet","segwit"]}'))
if tmpl["previousblockhash"] != bestblockhash:
logging.warning("GBT based off unexpected block (%s not %s), retrying", tmpl["previousblockhash"], bci["bestblockhash"])
time.sleep(1)
Expand Down

0 comments on commit 680dd0a

Please sign in to comment.