Skip to content

Commit 0db4818

Browse files
authored
Merge pull request #137 from xelis-project/dev
v1.21.2
2 parents d30922c + 085e7ee commit 0db4818

19 files changed

Lines changed: 662 additions & 162 deletions

File tree

Cargo.lock

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

xelis_common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xelis_common"
3-
version = "1.21.1"
3+
version = "1.21.2"
44
edition = "2021"
55
authors = ["Slixe <slixeprivate@gmail.com>"]
66
build = "build.rs"

xelis_common/src/asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl MaxSupplyMode {
173173
}
174174

175175
pub fn is_mintable(&self) -> bool {
176-
matches!(self, Self::Mintable(_))
176+
matches!(self, Self::Mintable(_) | Self::None)
177177
}
178178
}
179179

xelis_common/src/contract/opaque/asset/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
mod manager;
22

33
use anyhow::Context as AnyhowContext;
4+
use log::debug;
45
use xelis_vm::{
56
traits::{JSONHelper, Serializable},
67
Context,
@@ -256,10 +257,14 @@ pub async fn asset_mint<'a, 'ty, 'r, P: ContractProvider>(zelf: FnInstance<'a>,
256257
// Track supply changes
257258
// Also update the asset supply
258259

260+
let current_supply = changes.circulating_supply.1;
261+
debug!("Current supply: {}, minting amount: {}", current_supply, amount);
262+
259263
// Update the supply
260-
let new_supply = changes.circulating_supply.1.checked_add(amount)
264+
let new_supply = current_supply.checked_add(amount)
261265
.context("Overflow while minting supply")?;
262266

267+
debug!("New supply after minting: {}", new_supply);
263268
changes.circulating_supply.0.mark_updated();
264269
changes.circulating_supply.1 = new_supply;
265270
}

xelis_common/src/contract/opaque/contract.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ pub async fn contract_call<'a, 'ty, 'r, P: ContractProvider>(zelf: FnInstance<'a
134134
}
135135

136136
let p = p.into_iter()
137+
.rev()
137138
.map(|v| v.to_owned().into())
138139
.collect::<VecDeque<_>>();
139140

xelis_daemon/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xelis_daemon"
3-
version = "1.21.1"
3+
version = "1.21.2"
44
edition = "2021"
55
authors = ["Slixe <slixeprivate@gmail.com>"]
66

xelis_daemon/src/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ pub const CHAIN_SYNC_RESPONSE_MIN_BLOCKS: usize = 512;
134134
pub const CHAIN_SYNC_DEFAULT_RESPONSE_BLOCKS: usize = 4096;
135135
// allows up to X blocks hashes sent for response
136136
pub const CHAIN_SYNC_RESPONSE_MAX_BLOCKS: usize = u16::MAX as _;
137-
// send last 10 heights
138-
pub const CHAIN_SYNC_TOP_BLOCKS: usize = 10;
139137
// average block time is calculated on the last N topoheight
140138
pub const CHAIN_AVERAGE_BLOCK_TIME_N: u64 = 50;
141139

0 commit comments

Comments
 (0)