mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
DatabaseFullPrunedBlockStore implementations: Make sure SegWit addresses fit into the openoutputs.toaddress column.
This commit is contained in:
parent
141e4024e6
commit
76071d8378
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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" +
|
||||
|
@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user