From 9e4c14aada9e7afa1fb23f325b1e897a79078ed7 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 10 Jul 2023 12:47:20 -0400 Subject: [PATCH] add public-pool to OP_RETURN --- src/models/MiningJob.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models/MiningJob.ts b/src/models/MiningJob.ts index f0daa34..1f35851 100644 --- a/src/models/MiningJob.ts +++ b/src/models/MiningJob.ts @@ -50,7 +50,8 @@ export class MiningJob { // 39th byte onwards: Optional data with no consensus meaning coinbaseTransaction.ins[0].script = Buffer.concat([Buffer.from([littleEndianBlockHeight.byteLength]), littleEndianBlockHeight, Buffer.alloc(8, 0)]); - coinbaseTransaction.addOutput(bitcoinjs.script.compile([bitcoinjs.opcodes.OP_RETURN, Buffer.concat([segwitMagicBits, this.block.witnessCommit])]), 0); + const extra = Buffer.from('\\public-pool\\'); + coinbaseTransaction.addOutput(bitcoinjs.script.compile([bitcoinjs.opcodes.OP_RETURN, Buffer.concat([segwitMagicBits, this.block.witnessCommit, extra])]), 0); // get the non-witness coinbase tx //@ts-ignore