Merge go-crypto into tendermint#1782
Conversation
cli improvements
makes TestListener never quit
crypto/hkdfchacha20poly1305/hkdfchachapoly_test.go:36:25:warning: should use make([]byte, 24) instead (S1019) (gosimple)
use tendermint/crypto :-)
Codecov Report
@@ Coverage Diff @@
## develop #1782 +/- ##
===========================================
- Coverage 62.59% 62.44% -0.16%
===========================================
Files 126 140 +14
Lines 11350 11875 +525
===========================================
+ Hits 7105 7415 +310
- Misses 3597 3769 +172
- Partials 648 691 +43
|
| "github.com/tendermint/tmlibs/log" | ||
| ) | ||
|
|
||
| ////////////////////////////////////////////////////////////////////////////// |
| require.Equal(t, http.StatusNotFound, res.StatusCode, "should always return 404") | ||
| } | ||
|
|
||
| ////////////////////////////////////////////////////////////////////////////// |
|
|
||
| // TimeFormat is used for generating the sigs | ||
| const TimeFormat = amino.RFC3339Millis | ||
| const TimeFormat = "2006-01-02T15:04:05.000Z" |
There was a problem hiding this comment.
old version const TimeFormat = amino.RFC3339Millis is correct
There was a problem hiding this comment.
The version of amino this uses doesn't contain the constant anymore:
tendermint/go-amino@f81fa38
There was a problem hiding this comment.
oh, sorry. this one --->>>
https://github.com/tendermint/tendermint/pull/1756/files#diff-2a5c02592829cd2adae17d586208b772
There was a problem hiding this comment.
Tests fail, if I do this change.
types/priv_validator.go
Outdated
| sig := pv.privKey.Sign(heartbeat.SignBytes(chainID)) | ||
| sig, err := pv.privKey.Sign(heartbeat.SignBytes(chainID)) | ||
| if err != nil { | ||
| panic(err) |
types/priv_validator.go
Outdated
| sig := pv.privKey.Sign(signBytes) | ||
| sig, err := pv.privKey.Sign(signBytes) | ||
| if err != nil { | ||
| panic(err) |
| signature = locPrivKey.Sign(challenge[:]) | ||
| signature, err := locPrivKey.Sign(challenge[:]) | ||
| if err != nil { | ||
| panic(err) |
There was a problem hiding this comment.
can you add a todo to modify func to return err?
There was a problem hiding this comment.
Sure! Will do (and also open an issue so that doesn't get lost)
- re-add test - add TODO - err instead of panic where possible
|
Thanks for the review!! Addressed all your comments @melekes. PTAL |
rpc/lib/server/handlers_test.go
Outdated
| defer s.Close() | ||
|
|
||
| // check upgrader works | ||
| d := websocket.Dialer{} |
There was a problem hiding this comment.
what's up with formatting here?
There was a problem hiding this comment.
Somehow I disabled gofmt. Thanks
gofmt
| MaxPacketMsgPayloadSize int `mapstructure:"max_packet_msg_payload_size"` | ||
| // Maximum size of a message packet, in bytes | ||
| // Includes a header, which is ~13 bytes | ||
| MaxPacketMsgSize int `mapstructure:"max_packet_msg_size"` |
| plainHb := &Heartbeat{} | ||
| bz = plainHb.SignBytes("0xdeadbeef") | ||
| require.Equal(t, string(bz), `{"@chain_id":"0xdeadbeef","@type":"heartbeat","height":0,"round":0,"sequence":0,"validator_address":"","validator_index":0}`) | ||
| require.Equal(t, string(bz), `{"@chain_id":"0xdeadbeef","@type":"heartbeat","height":"0","round":"0","sequence":"0","validator_address":"","validator_index":"0"}`) |
There was a problem hiding this comment.
so ints are strings now huh
…1782) Otherwise, the events from app's BeginBlock won't be fired. Closes tendermint#1468 Co-authored-by: forcodedancing <just.haha.it@gmail.com>
* [ ] Wrote testsdoesn't apply* [ ] Updated CHANGELOG.mdPart of #1309
Contains
a lotbasically all of changes from #1721