minor fix x2
This commit is contained in:
parent
6da5f72de9
commit
55e4cf17fd
|
@ -22,7 +22,7 @@ var (
|
||||||
// returns 1 iff it set a file, otherwise 0 (so we can add them)
|
// returns 1 iff it set a file, otherwise 0 (so we can add them)
|
||||||
func setupFile(path, data string, perm os.FileMode) (int, error) {
|
func setupFile(path, data string, perm os.FileMode) (int, error) {
|
||||||
_, err := os.Stat(path)
|
_, err := os.Stat(path)
|
||||||
if !os.IsNotExist(err) { //permission errors generated if use os.IsExist
|
if !os.IsNotExist(err) { //note, os.IsExist(err) != !os.IsNotExist(err)
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
err = ioutil.WriteFile(path, []byte(data), perm)
|
err = ioutil.WriteFile(path, []byte(data), perm)
|
||||||
|
|
|
@ -199,7 +199,7 @@ func verifyCmd(cmd *cobra.Command, args []string) error {
|
||||||
|
|
||||||
proofBytes, err := hex.DecodeString(StripHex(proofFlag))
|
proofBytes, err := hex.DecodeString(StripHex(proofFlag))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofBytes, err)
|
return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofFlag, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
proof, err := merkle.ReadProof(proofBytes)
|
proof, err := merkle.ReadProof(proofBytes)
|
||||||
|
|
Loading…
Reference in New Issue