Skip to content

Commit

Permalink
fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
shiqizng committed Jan 25, 2022
1 parent 1707cad commit 2b8d1f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions idb/postgres/internal/encoding/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"math/rand"
"testing"

"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/data/basics"
"github.com/algorand/go-algorand/data/bookkeeping"
"github.com/algorand/go-algorand/data/transactions"
Expand Down Expand Up @@ -533,12 +534,12 @@ func TestTxnExtra(t *testing.T) {
// same object.
func TestNetworkStateEncoding(t *testing.T) {
network := types.NetworkState{
NetworkID: "testnet",
GenesisHash: crypto.Digest{77},
}

buf := EncodeNetworkState(&network)

expectedString := `{"networkID":"testnet"}`
expectedString := `{"genesis-hash":"TQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="}`
assert.Equal(t, expectedString, string(buf))

decodedNetwork, err := DecodeNetworkState(buf)
Expand Down

0 comments on commit 2b8d1f3

Please sign in to comment.