diff --git a/core b/core index 1599e2cf..3f4cbffd 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 1599e2cffb510d184fa71d77d976dc01756e1e4d +Subproject commit 3f4cbffd18acd753cdea5b2e73408ae4143e3cf7 diff --git a/deploy/deploy-peer/src/main/resources/config/init/ledger.init b/deploy/deploy-peer/src/main/resources/config/init/ledger.init index 82ae9016..c039b2f4 100644 --- a/deploy/deploy-peer/src/main/resources/config/init/ledger.init +++ b/deploy/deploy-peer/src/main/resources/config/init/ledger.init @@ -53,6 +53,8 @@ created-time=2019-08-01 14:26:58.069+0800 #security.role.GUEST.ledger-privileges= #security.role.GUEST.tx-privileges=CONTRACT_OPERATION +#账本数据库的锚定类型,分为:default, simple两种 +ledger.database.anchor=default #----------------------------------------------- #共识服务提供者;必须; diff --git a/framework b/framework index e0621c70..b3fbcec5 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit e0621c704af03ddd412fa9d5b6669ce5bd0ac1d1 +Subproject commit b3fbcec5df1e493eb6fd5841b47356d3cc4cef44 diff --git a/samples/sdk-samples/src/main/java/com/jdchain/samples/sdk/testnet/NodeWebContext.java b/samples/sdk-samples/src/main/java/com/jdchain/samples/sdk/testnet/NodeWebContext.java index eaba367b..3d472d60 100644 --- a/samples/sdk-samples/src/main/java/com/jdchain/samples/sdk/testnet/NodeWebContext.java +++ b/samples/sdk-samples/src/main/java/com/jdchain/samples/sdk/testnet/NodeWebContext.java @@ -65,7 +65,7 @@ public class NodeWebContext { public LedgerQuery registLedger(HashDigest ledgerHash) { DbConnection conn = db.connect(dbConnConfig.getUri()); - LedgerQuery ledgerRepo = ledgerManager.register(ledgerHash, conn.getStorageService()); + LedgerQuery ledgerRepo = ledgerManager.register(ledgerHash, conn.getStorageService(), dbConnConfig.getAnchor()); return ledgerRepo; } diff --git a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-0.conf b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-0.conf index 72b6d4e7..40f4c7ca 100644 --- a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-0.conf +++ b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-0.conf @@ -20,4 +20,6 @@ binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.parti.address=LdeP3fY7jJbN #账本的存储数据库的连接字符串; binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.uri=memory://local/0 #账本的存储数据库的连接口令; -binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= \ No newline at end of file +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= +#账本的存储数据库的锚定类型; +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.anchor=default diff --git a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-1.conf b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-1.conf index 3f821ecd..56d9d37a 100644 --- a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-1.conf +++ b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-1.conf @@ -20,4 +20,6 @@ binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.parti.address=LdeNnz88dH6C #账本的存储数据库的连接字符串; binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.uri=memory://local/1 #账本的存储数据库的连接口令; -binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= \ No newline at end of file +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= +#账本的存储数据库的锚定类型; +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.anchor=default diff --git a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-2.conf b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-2.conf index d389b218..fc6e19e2 100644 --- a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-2.conf +++ b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-2.conf @@ -20,4 +20,6 @@ binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.parti.address=LdeNmdpT4DiT #账本的存储数据库的连接字符串; binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.uri=memory://local/2 #账本的存储数据库的连接口令; -binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= \ No newline at end of file +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= +#账本的存储数据库的锚定类型; +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.anchor=default diff --git a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-3.conf b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-3.conf index 983ce496..620f4771 100644 --- a/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-3.conf +++ b/samples/sdk-samples/src/main/resources/testnet/ledger-binding-mem-3.conf @@ -20,4 +20,6 @@ binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.parti.address=LdeNekdXMHqy #账本的存储数据库的连接字符串; binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.uri=memory://local/3 #账本的存储数据库的连接口令; -binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= \ No newline at end of file +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.pwd= +#账本的存储数据库的锚定类型; +binding.6BCg5vgU57ykY6g2CpyUnt5ZMgdxfD1b3qXxQrRyfiXTQ.db.anchor=default diff --git a/samples/sdk-samples/src/main/resources/testnet/ledger.init b/samples/sdk-samples/src/main/resources/testnet/ledger.init index 9fe5a4e8..30b1c46c 100644 --- a/samples/sdk-samples/src/main/resources/testnet/ledger.init +++ b/samples/sdk-samples/src/main/resources/testnet/ledger.init @@ -17,6 +17,8 @@ consensus.conf=classpath:testnet/bftsmart.config crypto.service-providers=com.jd.blockchain.crypto.service.classic.ClassicCryptoService, \ com.jd.blockchain.crypto.service.sm.SMCryptoService +#账本数据库的锚定类型,分为:default, simple两种 +ledger.database.anchor=default #参与方的个数,后续以 cons_parti.id 分别标识每一个参与方的配置; cons_parti.count=4 diff --git a/test b/test index f58e1282..b6392819 160000 --- a/test +++ b/test @@ -1 +1 @@ -Subproject commit f58e12821c7c50709cc55cf50149597f6d3219b7 +Subproject commit b6392819e9dd9ee1ba27f391f2e2b05b44547622