Browse Source

ckdb/sql - increase the size of coinbase2 since core segwit changes before activation require a much larger coinbase

master
kanoi 8 years ago
parent
commit
036c291283
  1. 2
      sql/ckdb.sql
  2. 24
      sql/v1.0.7-v1.0.8.sql
  3. 4
      src/ckdb.h

2
sql/ckdb.sql

@ -178,7 +178,7 @@ CREATE TABLE workinfo (
merklehash text DEFAULT ''::text NOT NULL,
prevhash character varying(256) NOT NULL,
coinbase1 character varying(256) NOT NULL,
coinbase2 character varying(256) NOT NULL,
coinbase2 character varying(511) NOT NULL,
version character varying(64) NOT NULL,
bits character varying(64) NOT NULL,
ntime character varying(64) NOT NULL,

24
sql/v1.0.7-v1.0.8.sql

@ -0,0 +1,24 @@
SET SESSION AUTHORIZATION 'postgres';
BEGIN transaction;
DO $$
DECLARE ver TEXT;
BEGIN
UPDATE version set version='1.0.8' where vlock=1 and version='1.0.7';
IF found THEN
RETURN;
END IF;
SELECT version into ver from version
WHERE vlock=1;
RAISE EXCEPTION 'Wrong DB version - expect "1.0.7" - found "%"', ver;
END $$;
ALTER TABLE workinfo ALTER COLUMN coinbase2 TYPE varchar(511);
END transaction;

4
src/ckdb.h

@ -57,8 +57,8 @@
* Consider adding row level locking (a per kitem usage count) if needed */
#define DB_VLOCK "1"
#define DB_VERSION "1.0.7"
#define CKDB_VERSION DB_VERSION"-2.717"
#define DB_VERSION "1.0.8"
#define CKDB_VERSION DB_VERSION"-2.718"
#define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__

Loading…
Cancel
Save