lntemp: add more methods to support testUpdateChanStatus

This commit is contained in:
yyforyongyu
2022-07-22 17:33:26 +08:00
parent 1350f76627
commit cc69634a2e
6 changed files with 693 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package lntemp
import (
"fmt"
"io"
"os"
@@ -35,3 +36,11 @@ func CopyFile(dest, src string) error {
return d.Close()
}
// errNumNotMatched is a helper method to return a nicely formatted error.
func errNumNotMatched(name string, subject string,
want, got, total, old int) error {
return fmt.Errorf("%s: assert %s failed: want %d, got: %d, total: "+
"%d, previously had: %d", name, subject, want, got, total, old)
}