Skip to content

Commit 96b43bd

Browse files
committed
update bip300301 dependency
1 parent a0d8967 commit 96b43bd

File tree

4 files changed

+86
-19
lines changed

4 files changed

+86
-19
lines changed

Cargo.lock

Lines changed: 77 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ authors = [
1313
"Nikita Chashchinskii <nikita.chashchinskii@gmail.com>"
1414
]
1515
edition = "2021"
16-
version = "0.8.2"
16+
version = "0.8.3"
1717

1818
[workspace.dependencies.bip300301]
1919
git = "https://github.com/Ash-L2L/bip300301.git"
20-
rev = "e47a263c8cbf9c520aa80f71788ee28e9f11bb62"
20+
rev = "64568dee7b89fe8c021226f10b17a18fe3386871"
2121

2222
[workspace.dependencies.rustreexo]
2323
git = "https://github.com/Ash-L2L/rustreexo.git"

lib/archive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::cmp::Ordering;
22

33
use bip300301::{
4-
bitcoin::{self, block::Header as BitcoinHeader, hashes::Hash},
5-
DepositInfo,
4+
bitcoin::{self, hashes::Hash},
5+
DepositInfo, Header as BitcoinHeader,
66
};
77
use fallible_iterator::FallibleIterator;
88
use heed::{types::SerdeBincode, Database, RoTxn, RwTxn};
@@ -328,7 +328,7 @@ impl Archive {
328328
{
329329
return Err(Error::NoMainHeader(header.prev_blockhash));
330330
}
331-
let block_hash = header.block_hash();
331+
let block_hash = header.hash;
332332
let total_work =
333333
if header.prev_blockhash != bitcoin::BlockHash::all_zeros() {
334334
let prev_work =

lib/node.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ use std::{
77
};
88

99
use bip300301::{
10-
bitcoin::{
11-
self,
12-
block::{self, Header as BitcoinHeader},
13-
hashes::Hash,
14-
},
15-
DepositInfo,
10+
bitcoin::{self, hashes::Hash},
11+
DepositInfo, Header as BitcoinHeader,
1612
};
1713
use fallible_iterator::{FallibleIterator, IteratorExt};
1814
use futures::{stream, StreamExt, TryFutureExt};
@@ -168,7 +164,7 @@ async fn request_two_way_peg_data(
168164
.await?;
169165
let mut rwtxn = env.write_txn()?;
170166
// Deposits by block, first-to-last within each block
171-
let deposits_by_block: HashMap<block::BlockHash, Vec<DepositInfo>> = {
167+
let deposits_by_block: HashMap<bitcoin::BlockHash, Vec<DepositInfo>> = {
172168
let mut deposits = HashMap::<_, Vec<_>>::new();
173169
two_way_peg_data.deposits.into_iter().for_each(|deposit| {
174170
deposits
@@ -289,10 +285,10 @@ async fn submit_block(
289285
header: &Header,
290286
body: &Body,
291287
) -> Result<(), Error> {
292-
let mut rwtxn = env.write_txn()?;
293288
// Request mainchain headers if they do not exist
294289
request_ancestor_headers(env, archive, drivechain, header.prev_main_hash)
295290
.await?;
291+
let mut rwtxn = env.write_txn()?;
296292
let () = connect_tip_(
297293
&mut rwtxn, archive, drivechain, mempool, state, header, body,
298294
)

0 commit comments

Comments
 (0)