// Copyright the Hyperledger Fabric contributors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";

option go_package = "github.com/hyperledger/fabric-protos-go/common";
option java_package = "org.hyperledger.fabric.protos.common";

package common;

// Contains information about the blockchain ledger such as height, current
// block hash, and previous block hash.
message BlockchainInfo {
    uint64 height = 1;
    bytes currentBlockHash = 2;
    bytes previousBlockHash = 3;
    // Specifies bootstrapping snapshot info if the channel is bootstrapped from a snapshot.
    // It is nil if the channel is not bootstrapped from a snapshot.
    BootstrappingSnapshotInfo bootstrappingSnapshotInfo = 4;
}

// Contains information for the bootstrapping snapshot.
message BootstrappingSnapshotInfo {
    uint64 lastBlockInSnapshot = 1;
}
