From 818c586f18be9d41c4ca9a6e4abd3b2708979899 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Thu, 11 Aug 2016 13:37:51 -0400 Subject: [PATCH] Advertise segwit support Now that commitments can be handled. --- src/bitcoin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitcoin.c b/src/bitcoin.c index 996a9cf7..66593400 100644 --- a/src/bitcoin.c +++ b/src/bitcoin.c @@ -17,7 +17,7 @@ static const char *b58chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; -static char* understood_rules[] = {}; +static char* understood_rules[] = {"segwit"}; static bool check_required_rule(const char* rule) { unsigned int i; @@ -90,7 +90,7 @@ out: return ret; } -static const char *gbt_req = "{\"method\": \"getblocktemplate\", \"params\": [{\"capabilities\": [\"coinbasetxn\", \"workid\", \"coinbase/append\"]}]}\n"; +static const char *gbt_req = "{\"method\": \"getblocktemplate\", \"params\": [{\"capabilities\": [\"coinbasetxn\", \"workid\", \"coinbase/append\"], \"rules\" : [\"segwit\"]}]}\n"; /* Request getblocktemplate from bitcoind already connected with a connsock_t * and then summarise the information to the most efficient set of data