DatabaseFullPrunedBlockStore implementations: Make sure SegWit addresses fit into the openoutputs.toaddress column.

This commit is contained in:
Andreas Schildbach 2019-11-29 11:36:56 +01:00
parent 141e4024e6
commit 76071d8378
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,7 @@
/*
* Copyright 2012 Matt Corallo.
* Copyright 2014 Kalpesh Parmar.
* Copyright 2019 Andreas Schildbach
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -65,7 +66,7 @@ public class H2FullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
+ "height INT NOT NULL,"
+ "value BIGINT NOT NULL,"
+ "scriptbytes BLOB NOT NULL,"
+ "toaddress VARCHAR(35),"
+ "toaddress VARCHAR(74),"
+ "addresstargetable TINYINT,"
+ "coinbase BOOLEAN,"
+ "PRIMARY KEY (hash, index),"
@ -162,4 +163,4 @@ public class H2FullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
protected String getDatabaseDriverClass() {
return DATABASE_DRIVER_CLASS;
}
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright 2014 Kalpesh Parmar
* Copyright 2019 Andreas Schildbach
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -63,7 +64,7 @@ public class MySQLFullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
" height integer NOT NULL,\n" +
" value bigint NOT NULL,\n" +
" scriptbytes mediumblob NOT NULL,\n" +
" toaddress varchar(35),\n" +
" toaddress varchar(74),\n" +
" addresstargetable tinyint(1),\n" +
" coinbase boolean,\n" +
" CONSTRAINT openoutputs_pk PRIMARY KEY (hash, `index`) USING BTREE \n" +

View File

@ -74,7 +74,7 @@ public class PostgresFullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
" height integer NOT NULL,\n" +
" value bigint NOT NULL,\n" +
" scriptbytes bytea NOT NULL,\n" +
" toaddress character varying(35),\n" +
" toaddress character varying(74),\n" +
" addresstargetable smallint,\n" +
" coinbase boolean,\n" +
" CONSTRAINT openoutputs_pk PRIMARY KEY (hash,index)\n" +
@ -255,4 +255,4 @@ public class PostgresFullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
}
}
}
}