hyperledger / fabric-sdk-go

https://wiki.hyperledger.org/display/fabric
Apache License 2.0
911 stars 508 forks source link

pkg/client/channel/invoke: fix bug in validate #215

Closed xq840622 closed 2 years ago

xq840622 commented 2 years ago

When using couchdb, Json is stored alphabetically, while golang "encoding/json" orders json by struct-field order. There could be an error when user invoke/query peer with both couchdb-peer and leveldb-peer. The same problem could also happen when we use both javaCC and goCC.

codecov[bot] commented 2 years ago

Codecov Report

Merging #215 (f3305a0) into main (4f34271) will increase coverage by 0.06%. The diff coverage is 100.00%.

:exclamation: Current head f3305a0 differs from pull request most recent head 4496d10. Consider uploading reports for the commit 4496d10 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   76.09%   76.15%   +0.06%     
==========================================
  Files         193      193              
  Lines       14064    14075      +11     
==========================================
+ Hits        10702    10719      +17     
+ Misses       2393     2389       -4     
+ Partials      969      967       -2     
Impacted Files Coverage Δ
pkg/client/channel/invoke/txnhandler.go 83.75% <100.00%> (+1.19%) :arrow_up:
pkg/fab/ccpackager/javapackager/packager.go 75.28% <100.00%> (ø)
pkg/util/concurrent/lazyref/lazyref.go 96.31% <0.00%> (+3.68%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4f34271...4496d10. Read the comment docs.