Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 535bcd3

Browse files
committed
[FAB-6523] Bump Fabric version
Change-Id: I862909bd91a746b5b6476ca6bd4fa70dcebe4082 Signed-off-by: Troy Ronda <troy@troyronda.com>
1 parent 28e9a8b commit 535bcd3

File tree

4 files changed

+525
-82
lines changed

4 files changed

+525
-82
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ FABRIC_DEV_REGISTRY_PRE_CMD ?= docker login -u docker -p docker nexus3.hyperledg
6565
THIRDPARTY_FABRIC_CA_BRANCH ?= master
6666
THIRDPARTY_FABRIC_CA_COMMIT ?= v1.1.0-preview
6767
THIRDPARTY_FABRIC_BRANCH ?= master
68-
THIRDPARTY_FABRIC_COMMIT ?= d783a0d569a155543c2e268cd14fad2d8aef34e9
68+
THIRDPARTY_FABRIC_COMMIT ?= 4a0d55122fd5c2eef543ed5bd41c32f2b4cdb520
6969

7070
# Force removal of images in cleanup (overridable)
7171
FIXTURE_DOCKER_REMOVE_FORCE ?= false

internal/github.com/hyperledger/fabric/common/util/utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,5 @@ func ConcatenateBytes(data ...[]byte) []byte {
8080
}
8181
return result
8282
}
83+
84+
const DELIMITER = "."

internal/github.com/hyperledger/fabric/core/ledger/ledger_interface.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030

3131
// PeerLedgerProvider provides handle to ledger instances
3232
type PeerLedgerProvider interface {
33+
Initialize(statelisteners StateListeners)
3334
// Create creates a new ledger with the given genesis block.
3435
// This function guarantees that the creation of ledger and committing the genesis block would an atomic action
3536
// The chain id retrieved from the genesis block is treated as a ledger id
@@ -269,3 +270,24 @@ func (txSim *TxSimulationResults) GetPvtSimulationBytes() ([]byte, error) {
269270
func (txSim *TxSimulationResults) ContainsPvtWrites() bool {
270271
return txSim.PvtSimulationResults != nil
271272
}
273+
274+
// StateListener allows a custom code for performing additional stuff upon state change
275+
// for a perticular namespace against which the listener is registered.
276+
// This helps to perform custom tasks other than the state updates.
277+
// A ledger implemetation is expected to invoke Function `HandleStateUpdates` once per block and
278+
// the `stateUpdates` parameter passed to the function captures the state changes caused by the block
279+
// for the namespace. The actual data type of stateUpdates depends on the data model enabled.
280+
// For instance, for KV data model, the actual type would be proto message
281+
// `github.com/hyperledger/fabric/protos/ledger/rwset/kvrwset.KVWrite`
282+
// Function `HandleStateUpdates` is expected to be invoked before block is committed and if this
283+
// function returns an error, the ledger implementation is expected to halt block commit operation
284+
// and result in a panic
285+
type StateListener interface {
286+
HandleStateUpdates(ledgerID string, stateUpdates StateUpdates) error
287+
}
288+
289+
// StateUpdates is the generic type to represent the state updates
290+
type StateUpdates interface{}
291+
292+
// StateListeners maintains the association between a namespace to its corresponding listener
293+
type StateListeners map[string]StateListener

0 commit comments

Comments
 (0)