|
@ -16,11 +16,10 @@ func BenchmarkEncodeStatusWire(b *testing.B) { |
|
|
b.StopTimer() |
|
|
b.StopTimer() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey() |
|
|
status := &ctypes.ResultStatus{ |
|
|
status := &ctypes.ResultStatus{ |
|
|
NodeInfo: &p2p.NodeInfo{ |
|
|
|
|
|
|
|
|
NodeInfo: p2p.NodeInfo{ |
|
|
PubKey: pubKey, |
|
|
PubKey: pubKey, |
|
|
Moniker: "SOMENAME", |
|
|
Moniker: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
RemoteAddr: "SOMEADDR", |
|
|
|
|
|
ListenAddr: "SOMEADDR", |
|
|
ListenAddr: "SOMEADDR", |
|
|
Version: "SOMEVER", |
|
|
Version: "SOMEVER", |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
@ -43,11 +42,10 @@ func BenchmarkEncodeStatusWire(b *testing.B) { |
|
|
func BenchmarkEncodeNodeInfoWire(b *testing.B) { |
|
|
func BenchmarkEncodeNodeInfoWire(b *testing.B) { |
|
|
b.StopTimer() |
|
|
b.StopTimer() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey() |
|
|
nodeInfo := &p2p.NodeInfo{ |
|
|
|
|
|
|
|
|
nodeInfo := p2p.NodeInfo{ |
|
|
PubKey: pubKey, |
|
|
PubKey: pubKey, |
|
|
Moniker: "SOMENAME", |
|
|
Moniker: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
RemoteAddr: "SOMEADDR", |
|
|
|
|
|
ListenAddr: "SOMEADDR", |
|
|
ListenAddr: "SOMEADDR", |
|
|
Version: "SOMEVER", |
|
|
Version: "SOMEVER", |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
@ -64,11 +62,10 @@ func BenchmarkEncodeNodeInfoWire(b *testing.B) { |
|
|
func BenchmarkEncodeNodeInfoBinary(b *testing.B) { |
|
|
func BenchmarkEncodeNodeInfoBinary(b *testing.B) { |
|
|
b.StopTimer() |
|
|
b.StopTimer() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey() |
|
|
nodeInfo := &p2p.NodeInfo{ |
|
|
|
|
|
|
|
|
nodeInfo := p2p.NodeInfo{ |
|
|
PubKey: pubKey, |
|
|
PubKey: pubKey, |
|
|
Moniker: "SOMENAME", |
|
|
Moniker: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
RemoteAddr: "SOMEADDR", |
|
|
|
|
|
ListenAddr: "SOMEADDR", |
|
|
ListenAddr: "SOMEADDR", |
|
|
Version: "SOMEVER", |
|
|
Version: "SOMEVER", |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
@ -87,11 +84,10 @@ func BenchmarkEncodeNodeInfoProto(b *testing.B) { |
|
|
b.StopTimer() |
|
|
b.StopTimer() |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey().Unwrap().(crypto.PubKeyEd25519) |
|
|
pubKey := crypto.GenPrivKeyEd25519().PubKey().Unwrap().(crypto.PubKeyEd25519) |
|
|
pubKey2 := &proto.PubKey{Ed25519: &proto.PubKeyEd25519{Bytes: pubKey[:]}} |
|
|
pubKey2 := &proto.PubKey{Ed25519: &proto.PubKeyEd25519{Bytes: pubKey[:]}} |
|
|
nodeInfo := &proto.NodeInfo{ |
|
|
|
|
|
|
|
|
nodeInfo := proto.NodeInfo{ |
|
|
PubKey: pubKey2, |
|
|
PubKey: pubKey2, |
|
|
Moniker: "SOMENAME", |
|
|
Moniker: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
Network: "SOMENAME", |
|
|
RemoteAddr: "SOMEADDR", |
|
|
|
|
|
ListenAddr: "SOMEADDR", |
|
|
ListenAddr: "SOMEADDR", |
|
|
Version: "SOMEVER", |
|
|
Version: "SOMEVER", |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
|
Other: []string{"SOMESTRING", "OTHERSTRING"}, |
|
|