Kernels v2 (variable size) (#3034)

* wip

* exhaustive match

* write with fixed v1 strategy when writing for hashing

* local protocol version is 2

* cleanup "size" tests that exercise v1 vs v2 vs default protocol versions

* add proto version to Connected! log msg

* cleanup docs

* negotiate protocol version min(local, peer) when doing hand/shake
This commit is contained in:
Antioch Peverell
2019-09-19 14:31:46 +01:00
committed by GitHub
parent b209244d17
commit bc6108cf12
8 changed files with 166 additions and 75 deletions
+2 -2
View File
@@ -75,8 +75,8 @@ impl PoolPushHandler {
.map_err(|e| ErrorKind::RequestError(format!("Bad request: {}", e)).into())
})
.and_then(move |tx_bin| {
// TODO - pass protocol version in via the api call?
let version = ProtocolVersion::local();
// All wallet api interaction explicitly uses protocol version 1 for now.
let version = ProtocolVersion(1);
ser::deserialize(&mut &tx_bin[..], version)
.map_err(|e| ErrorKind::RequestError(format!("Bad request: {}", e)).into())