coins: Add force_bip143

pull/25/head
Saleem Rashid 7 years ago committed by Pavol Rusnak
parent b6f11c9f93
commit c6246b5fba

@ -21,6 +21,7 @@ def get_fields(coin):
'true' if coin['address_type_p2sh'] is not None else 'false',
'true' if coin['segwit'] else 'false',
'true' if coin['forkid'] is not None else 'false',
'true' if coin['force_bip143'] else 'false',
'%d' % coin['address_type'] if coin['address_type'] is not None else '0',
'%d' % coin['address_type_p2sh'] if coin['address_type_p2sh'] is not None else '0',
'0x%s' % coin['xpub_magic'] if coin['xpub_magic'] is not None else '0x00000000',

@ -34,6 +34,7 @@ typedef struct _CoinInfo {
bool has_address_type_p2sh;
bool has_segwit;
bool has_forkid;
bool force_bip143;
// address types > 0xFF represent a two-byte prefix in big-endian order
uint32_t address_type;
uint32_t address_type_p2sh;

@ -258,6 +258,8 @@ void fsm_msgGetFeatures(GetFeatures *msg)
resp->coins[i].segwit = coins[i].has_segwit;
resp->coins[i].has_forkid = coins[i].has_forkid;
resp->coins[i].forkid = coins[i].forkid;
resp->coins[i].has_force_bip143 = true;
resp->coins[i].force_bip143 = coins[i].force_bip143;
}
resp->has_initialized = true; resp->initialized = storage_isInitialized();
resp->has_imported = true; resp->imported = storage.has_imported && storage.imported;

Loading…
Cancel
Save