Commit 86c3f76d authored by Manish Sethi's avatar Manish Sethi Committed by Gerrit Code Review
Browse files

Merge "FAB-14865 - Fix log message" into release-1.4

parents 3adb4115 0d738341
......@@ -145,7 +145,7 @@ func (h *queryHelper) getPrivateData(ns, coll, key string) ([]byte, error) {
}
if !version.AreSame(hashVersion, ver) {
return nil, &txmgr.ErrPvtdataNotAvailable{Msg: fmt.Sprintf(
"private data matching public hash version is not available. Public hash version = %#v, Private data version = %#v",
"private data matching public hash version is not available. Public hash version = %s, Private data version = %s",
hashVersion, ver)}
}
if h.rwsetBuilder != nil {
......
......@@ -16,7 +16,11 @@ limitations under the License.
package version
import "github.com/hyperledger/fabric/common/ledger/util"
import (
"fmt"
"github.com/hyperledger/fabric/common/ledger/util"
)
// Height represents the height of a transaction in blockchain
type Height struct {
......@@ -63,6 +67,11 @@ func (h *Height) Compare(h1 *Height) int {
return -1
}
// String returns string for printing
func (h *Height) String() string {
return fmt.Sprintf("{BlockNum: %d, TxNum: %d}", h.BlockNum, h.TxNum)
}
// AreSame returns true if both the heights are either nil or equal
func AreSame(h1 *Height, h2 *Height) bool {
if h1 == nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment