Skip to content

Commit

Permalink
Merge commit '19db94a8de00885fd5043ef8c7a5021865843a46'
Browse files Browse the repository at this point in the history
  • Loading branch information
ynohtna92 committed Dec 2, 2023
2 parents 38854fc + 19db94a commit df43074
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*.redb
/.idea/
/.vagrant
/docs/build
/fuzz/artifacts
/fuzz/corpus
/fuzz/coverage
/fuzz/target
/index.redb
/ord.log
/target
/test-times.txt
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

[0.11.1](https://github.com/ordinals/ord/releases/tag/0.11.1) - 2023-11-09
--------------------------------------------------------------------------

### Fixed
- Use new RPC client in Reorg::get_block_with_retries (#2650)

### Misc
- Refactor varint encoding (#2645)

[0.11.0](https://github.com/ordinals/ord/releases/tag/0.11.0) - 2023-11-07
--------------------------------------------------------------------------

Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ord-litecoin"
description = "◉ Ordinal wallet and block explorer for litecoin"
version = "0.11.0"
version = "0.11.1"
license = "CC0-1.0"
edition = "2021"
autotests = false
Expand Down
5 changes: 1 addition & 4 deletions src/index/fetcher.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use {
crate::Options,
anyhow::{anyhow, Result},
super::*,
base64::Engine,
bitcoin::{Transaction, Txid},
hyper::{client::HttpConnector, Body, Client, Method, Request, Uri},
serde::Deserialize,
serde_json::{json, Value},
};

Expand Down
3 changes: 2 additions & 1 deletion src/index/reorg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ impl Reorg {

if (height < SAVEPOINT_INTERVAL || height % SAVEPOINT_INTERVAL == 0)
&& index
.client
.options
.bitcoin_rpc_client()?
.get_blockchain_info()?
.headers
.saturating_sub(height)
Expand Down
15 changes: 3 additions & 12 deletions src/runes/varint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,12 @@ pub fn encode_to_vec(mut n: u128, v: &mut Vec<u8>) {
let mut out = [0; 19];
let mut i = 18;

loop {
let mut byte = n.to_le_bytes()[0] & 0b0111_1111;

if i < 18 {
byte |= 0b1000_0000;
}

out[i] = byte;

if n < 0b1000_0000 {
break;
}
out[i] = n.to_le_bytes()[0] & 0b0111_1111;

while n > 0b0111_1111 {
n = n / 128 - 1;
i -= 1;
out[i] = n.to_le_bytes()[0] | 0b1000_0000;
}

v.extend_from_slice(&out[i..]);
Expand Down

0 comments on commit df43074

Please sign in to comment.