Skip to content
Permalink
Browse files

modified sql of create found_nmc_blocks table

  • Loading branch information...
duguyifang authored and SwimmingTiger committed Aug 7, 2019
1 parent 0ab1780 commit 4886337046674a849682f9dbb7fa42f5e176f4dc
Showing with 13 additions and 2 deletions.
  1. +2 −0 install/bpool_local_db.sql
  2. +9 −0 install/db.change.sql
  3. +2 −2 src/bitcoin/BlockMakerBitcoin.cc
@@ -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`)
@@ -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`;
@@ -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) {

@@ -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(),

0 comments on commit 4886337

Please sign in to comment.
You can’t perform that action at this time.