@@ -28,7 +28,7 @@ func verify(cCtx *cli.Context) error {
2828 proofType = cCtx .Args ().Get (1 )
2929 proofPath = cCtx .Args ().Get (2 )
3030 }
31- log .Info ("verify proof in: " , proofPath , "type" , proofType , "forkName" , forkName )
31+ log .Info ("verify proof" , "in " , proofPath , "type" , proofType , "forkName" , forkName )
3232
3333 // Load the content of the proof file
3434 data , err := os .ReadFile (filepath .Clean (proofPath ))
@@ -53,7 +53,7 @@ func verify(cCtx *cli.Context) error {
5353 return fmt .Errorf ("no vk loaded for fork %s" , forkName )
5454 }
5555 if len (proof .Vk ) != 0 {
56- if bytes .Equal (proof .Vk , vk ) {
56+ if ! bytes .Equal (proof .Vk , vk ) {
5757 return fmt .Errorf ("unmatch vk with expected: expected %s, get %s" ,
5858 base64 .StdEncoding .EncodeToString (vk ),
5959 base64 .StdEncoding .EncodeToString (proof .Vk ),
@@ -74,7 +74,7 @@ func verify(cCtx *cli.Context) error {
7474 return fmt .Errorf ("no vk loaded for fork %s" , forkName )
7575 }
7676 if len (proof .Vk ) != 0 {
77- if bytes .Equal (proof .Vk , vk ) {
77+ if ! bytes .Equal (proof .Vk , vk ) {
7878 return fmt .Errorf ("unmatch vk with expected: expected %s, get %s" ,
7979 base64 .StdEncoding .EncodeToString (vk ),
8080 base64 .StdEncoding .EncodeToString (proof .Vk ),
@@ -94,16 +94,7 @@ func verify(cCtx *cli.Context) error {
9494 if ! ok {
9595 return fmt .Errorf ("no vk loaded for fork %s" , forkName )
9696 }
97- if len (proof .Vk ) != 0 {
98- if bytes .Equal (proof .Vk , vk ) {
99- return fmt .Errorf ("unmatch vk with expected: expected %s, get %s" ,
100- base64 .StdEncoding .EncodeToString (vk ),
101- base64 .StdEncoding .EncodeToString (proof .Vk ),
102- )
103- }
104- } else {
105- proof .Vk = vk
106- }
97+ proof .Vk = vk
10798
10899 ret , err = vf .VerifyBundleProof (proof , forkName )
109100 default :
0 commit comments