From 7d6b8a5f995ebedb22e5323d0cf074d9e2c29e64 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Fri, 24 Apr 2020 20:44:51 +0100 Subject: [PATCH 1/2] snow: Use backtick strings to avoid escaping Brady Goat banner Much nicer on the eye IMHO --- snow/consensus/snowball/parameters.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/snow/consensus/snowball/parameters.go b/snow/consensus/snowball/parameters.go index 7d77405..230f2d7 100644 --- a/snow/consensus/snowball/parameters.go +++ b/snow/consensus/snowball/parameters.go @@ -10,20 +10,21 @@ import ( ) const ( - errMsg = "__________ .___\n" + - "\\______ \\____________ __| _/__.__.\n" + - " | | _/\\_ __ \\__ \\ / __ < | |\n" + - " | | \\ | | \\// __ \\_/ /_/ |\\___ |\n" + - " |______ / |__| (____ /\\____ |/ ____|\n" + - " \\/ \\/ \\/\\/\n" + + errMsg = "" + + `__________ .___` + "\n" + + `\______ \____________ __| _/__.__.` + "\n" + + ` | | _/\_ __ \__ \ / __ < | |` + "\n" + + ` | | \ | | \// __ \_/ /_/ |\___ |` + "\n" + + ` |______ / |__| (____ /\____ |/ ____|` + "\n" + + ` \/ \/ \/\/` + "\n" + "\n" + - "🏆 🏆 🏆 🏆 🏆 🏆\n" + - " ________ ________ ________________\n" + - " / _____/ \\_____ \\ / _ \\__ ___/\n" + - "/ \\ ___ / | \\ / /_\\ \\| |\n" + - "\\ \\_\\ \\/ | \\/ | \\ |\n" + - " \\______ /\\_______ /\\____|__ /____|\n" + - " \\/ \\/ \\/\n" + `🏆 🏆 🏆 🏆 🏆 🏆` + "\n" + + ` ________ ________ ________________` + "\n" + + ` / _____/ \_____ \ / _ \__ ___/` + "\n" + + `/ \ ___ / | \ / /_\ \| |` + "\n" + + `\ \_\ \/ | \/ | \ |` + "\n" + + ` \______ /\_______ /\____|__ /____|` + "\n" + + ` \/ \/ \/` + "\n" ) // Parameters required for snowball consensus From bbe250c529818581d352809e3dbcf00468b6602e Mon Sep 17 00:00:00 2001 From: StephenButtolph Date: Fri, 24 Apr 2020 16:24:10 -0400 Subject: [PATCH 2/2] endtime -> endTime --- vms/platformvm/service_test.go | 2 +- vms/platformvm/static_service.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vms/platformvm/service_test.go b/vms/platformvm/service_test.go index 6efb8d6..051c2c0 100644 --- a/vms/platformvm/service_test.go +++ b/vms/platformvm/service_test.go @@ -9,7 +9,7 @@ import ( ) func TestAddDefaultSubnetValidator(t *testing.T) { - expectedJSONString := `{"startTime":"0","endtime":"0","id":null,"destination":null,"delegationFeeRate":"0","payerNonce":"0"}` + expectedJSONString := `{"startTime":"0","endTime":"0","id":null,"destination":null,"delegationFeeRate":"0","payerNonce":"0"}` args := AddDefaultSubnetValidatorArgs{} bytes, err := json.Marshal(&args) if err != nil { diff --git a/vms/platformvm/static_service.go b/vms/platformvm/static_service.go index 80b66d2..86af005 100644 --- a/vms/platformvm/static_service.go +++ b/vms/platformvm/static_service.go @@ -44,7 +44,7 @@ type APIAccount struct { // is sent when this staker is done staking. type APIValidator struct { StartTime json.Uint64 `json:"startTime"` - EndTime json.Uint64 `json:"endtime"` + EndTime json.Uint64 `json:"endTime"` Weight *json.Uint64 `json:"weight,omitempty"` StakeAmount *json.Uint64 `json:"stakeAmount,omitempty"` ID ids.ShortID `json:"id"`