[2.x.x] deserialization now protocol version aware (#2824)
* introduce protocol version to deserialize and read * thread protocol version through our reader * example protocol version access in kernel read * fix our StreamingReader impl (WouldBlock woes) * debug log progress of txhashset download
This commit is contained in:
+2
-2
@@ -23,7 +23,7 @@ use crate::core::core::{
|
||||
};
|
||||
use crate::core::global;
|
||||
use crate::core::pow;
|
||||
use crate::core::ser::{Readable, StreamingReader};
|
||||
use crate::core::ser::{ProtocolVersion, Readable, StreamingReader};
|
||||
use crate::error::{Error, ErrorKind};
|
||||
use crate::pipe;
|
||||
use crate::store;
|
||||
@@ -647,7 +647,7 @@ impl Chain {
|
||||
/// TODO - Write this data to disk and validate the rebuilt kernel MMR.
|
||||
pub fn kernel_data_write(&self, reader: &mut Read) -> Result<(), Error> {
|
||||
let mut count = 0;
|
||||
let mut stream = StreamingReader::new(reader, Duration::from_secs(1));
|
||||
let mut stream = StreamingReader::new(reader, ProtocolVersion::default(), Duration::from_secs(1));
|
||||
while let Ok(_kernel) = TxKernelEntry::read(&mut stream) {
|
||||
count += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user