[multistream-select] Fix panic with V1Lazy (regression) and more convenient transport boxing. (#1783)

* [multistream-select] Fix panic with V1Lazy and add integration tests.

Fixes a panic when using the `V1Lazy` negotiation protocol,
a regression introduced in https://github.com/libp2p/rust-libp2p/pull/1484.

Thereby adds integration tests for a transport upgrade with both
`V1` and `V1Lazy` to the `multistream-select` crate to prevent
future regressions.

* Cleanup.

* Update changelog.
This commit is contained in:
Roman Borschel
2020-10-07 11:10:54 +02:00
committed by GitHub
parent 2a5c1832a1
commit 3e31ea9337
13 changed files with 193 additions and 78 deletions

View File

@ -127,6 +127,7 @@ impl<TInner> Negotiated<TInner> {
if let Message::Header(v) = &msg {
if *v == version {
*this.state = State::Expecting { io, protocol, version };
continue
}
}