Skip to content

Commit

Permalink
modified sql of create found_nmc_blocks table
Browse files Browse the repository at this point in the history
  • Loading branch information
Mita23456 authored and SwimmingTiger committed Aug 7, 2019
1 parent 0ab1780 commit 4886337
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions install/bpool_local_db.sql
Expand Up @@ -34,6 +34,8 @@ CREATE TABLE `found_nmc_blocks` (
`aux_block_hash` char(64) NOT NULL,
`aux_pow` text NOT NULL,
`is_orphaned` tinyint(4) NOT NULL DEFAULT '0',
`chain_name` varchar(20) NOT NULL DEFAULT '',
`submit_response` varchar(255) NOT NULL DEFAULT '',
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `aux_block_hash` (`aux_block_hash`)
Expand Down
9 changes: 9 additions & 0 deletions install/db.change.sql
Expand Up @@ -52,3 +52,12 @@ add `reject_detail` varchar(255) default '' NOT NULL after `share_reject`;
ALTER TABLE `stats_workers_hour`
add `share_stale` BIGINT default 0 NOT NULL after `share_accept`,
add `reject_detail` varchar(255) default '' NOT NULL after `share_reject`;


--
-- 2019-08-07
-- add `chain_name`, `submit_response` to table `found_nmc_blocks`
--
ALTER TABLE `found_nmc_blocks`
add `chain_name` varchar(20) NOT NULL default '' after `is_orphaned`,
add `submit_response` varchar(255) NOT NULL default '' after `is_orphaned`;
4 changes: 2 additions & 2 deletions src/bitcoin/BlockMakerBitcoin.cc
Expand Up @@ -1495,7 +1495,7 @@ void BlockMakerBitcoin::insertAuxBlock2Mysql(
const string auxtablename,
const string chainnane,
const string auxblockhash,
const string parentblockhask,
const string parentblockhash,
const string submitresponse,
const string auxpow) {

Expand All @@ -1506,7 +1506,7 @@ void BlockMakerBitcoin::insertAuxBlock2Mysql(
" `submit_response`, `aux_pow`,`created_at`) "
" VALUES (\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"); ",
auxtablename.c_str(),
parentblockhask.c_str(),
parentblockhash.c_str(),
auxblockhash.c_str(),
chainnane.c_str(),
submitresponse.c_str(),
Expand Down

0 comments on commit 4886337

Please sign in to comment.