From e687ceeae76ab0963646bdff25ebba1c0651feb8 Mon Sep 17 00:00:00 2001 From: Ori Newman Date: Fri, 11 Mar 2022 08:56:36 +0200 Subject: [PATCH] Add version to block template (#1967) --- app/rpc/rpchandlers/get_block_template.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/rpc/rpchandlers/get_block_template.go b/app/rpc/rpchandlers/get_block_template.go index 84a1a2188..6fa2b4a26 100644 --- a/app/rpc/rpchandlers/get_block_template.go +++ b/app/rpc/rpchandlers/get_block_template.go @@ -7,6 +7,7 @@ import ( "github.com/kaspanet/kaspad/domain/consensus/utils/txscript" "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/kaspanet/kaspad/util" + "github.com/kaspanet/kaspad/version" ) // HandleGetBlockTemplate handles the respectively named RPC command @@ -25,7 +26,7 @@ func HandleGetBlockTemplate(context *rpccontext.Context, _ *router.Router, reque return nil, err } - coinbaseData := &externalapi.DomainCoinbaseData{ScriptPublicKey: scriptPublicKey} + coinbaseData := &externalapi.DomainCoinbaseData{ScriptPublicKey: scriptPublicKey, ExtraData: []byte(version.Version())} templateBlock, err := context.Domain.MiningManager().GetBlockTemplate(coinbaseData) if err != nil {