mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 08:51:32 +00:00
prettyprint block, unified state hash, test block mutation.
This commit is contained in:
@ -15,13 +15,12 @@ func BenchmarkTestCustom(b *testing.B) {
|
||||
b.StopTimer()
|
||||
|
||||
h := &Header{
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
ValidationStateHash: []byte("validationhash"),
|
||||
AccountStateHash: []byte("accounthash"),
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
StateHash: []byte("statehash"),
|
||||
}
|
||||
|
||||
buf := bytes.NewBuffer(nil)
|
||||
@ -40,26 +39,24 @@ func BenchmarkTestCustom(b *testing.B) {
|
||||
}
|
||||
|
||||
type HHeader struct {
|
||||
Network string `json:"N"`
|
||||
Height uint64 `json:"H"`
|
||||
Fees uint64 `json:"F"`
|
||||
Time uint64 `json:"T"`
|
||||
LastBlockHash []byte `json:"PH"`
|
||||
ValidationStateHash []byte `json:"VH"`
|
||||
AccountStateHash []byte `json:"DH"`
|
||||
Network string `json:"N"`
|
||||
Height uint64 `json:"H"`
|
||||
Fees uint64 `json:"F"`
|
||||
Time uint64 `json:"T"`
|
||||
LastBlockHash []byte `json:"PH"`
|
||||
StateHash []byte `json:"SH"`
|
||||
}
|
||||
|
||||
func BenchmarkTestJSON(b *testing.B) {
|
||||
b.StopTimer()
|
||||
|
||||
h := &HHeader{
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: 123,
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
ValidationStateHash: []byte("validationhash"),
|
||||
AccountStateHash: []byte("accounthash"),
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: 123,
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
StateHash: []byte("statehash"),
|
||||
}
|
||||
h2 := &HHeader{}
|
||||
|
||||
@ -82,13 +79,12 @@ func BenchmarkTestGob(b *testing.B) {
|
||||
b.StopTimer()
|
||||
|
||||
h := &Header{
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
ValidationStateHash: []byte("validationhash"),
|
||||
AccountStateHash: []byte("datahash"),
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
StateHash: []byte("statehash"),
|
||||
}
|
||||
h2 := &Header{}
|
||||
|
||||
@ -111,13 +107,12 @@ func BenchmarkTestMsgPack(b *testing.B) {
|
||||
b.StopTimer()
|
||||
|
||||
h := &Header{
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
ValidationStateHash: []byte("validationhash"),
|
||||
AccountStateHash: []byte("datahash"),
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
StateHash: []byte("statehash"),
|
||||
}
|
||||
h2 := &Header{}
|
||||
|
||||
@ -140,13 +135,12 @@ func BenchmarkTestMsgPack2(b *testing.B) {
|
||||
b.StopTimer()
|
||||
|
||||
h := &Header{
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
ValidationStateHash: []byte("validationhash"),
|
||||
AccountStateHash: []byte("accounthash"),
|
||||
Network: "Header",
|
||||
Height: 123,
|
||||
Fees: 123,
|
||||
Time: time.Unix(123, 0),
|
||||
LastBlockHash: []byte("prevhash"),
|
||||
StateHash: []byte("statehash"),
|
||||
}
|
||||
h2 := &Header{}
|
||||
var mh codec.MsgpackHandle
|
||||
|
Reference in New Issue
Block a user