FIX: integers incorrectly encoded as a rune with append. Go no longer allows it.
This commit is contained in:
parent
063c4115b3
commit
24e673ae72
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ import (
|
||||||
type UnsupportedWitnessVerError byte
|
type UnsupportedWitnessVerError byte
|
||||||
|
|
||||||
func (e UnsupportedWitnessVerError) Error() string {
|
func (e UnsupportedWitnessVerError) Error() string {
|
||||||
return "unsupported witness version: " + string(e)
|
return fmt.Sprintf("unsupported witness version: %#x", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnsupportedWitnessProgLenError describes an error where a segwit address
|
// UnsupportedWitnessProgLenError describes an error where a segwit address
|
||||||
|
@ -31,7 +31,7 @@ func (e UnsupportedWitnessVerError) Error() string {
|
||||||
type UnsupportedWitnessProgLenError int
|
type UnsupportedWitnessProgLenError int
|
||||||
|
|
||||||
func (e UnsupportedWitnessProgLenError) Error() string {
|
func (e UnsupportedWitnessProgLenError) Error() string {
|
||||||
return "unsupported witness program length: " + string(e)
|
return fmt.Sprintf("unsupported witness program length: %d", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -23,7 +23,7 @@ func TestBech32(t *testing.T) {
|
||||||
{"split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", true},
|
{"split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", true},
|
||||||
{"split1checkupstagehandshakeupstreamerranterredcaperred2y9e2w", false}, // invalid checksum
|
{"split1checkupstagehandshakeupstreamerranterredcaperred2y9e2w", false}, // invalid checksum
|
||||||
{"s lit1checkupstagehandshakeupstreamerranterredcaperredp8hs2p", false}, // invalid character (space) in hrp
|
{"s lit1checkupstagehandshakeupstreamerranterredcaperredp8hs2p", false}, // invalid character (space) in hrp
|
||||||
{"spl" + string(127) + "t1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", false}, // invalid character (DEL) in hrp
|
{"spl\x7Ft1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", false}, // invalid character (DEL) in hrp
|
||||||
{"split1cheo2y9e2w", false}, // invalid character (o) in data part
|
{"split1cheo2y9e2w", false}, // invalid character (o) in data part
|
||||||
{"split1a2y9w", false}, // too short data part
|
{"split1a2y9w", false}, // too short data part
|
||||||
{"1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", false}, // empty hrp
|
{"1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", false}, // empty hrp
|
||||||
|
|
Loading…
Reference in a new issue