Skip to content

Commit 55194f7

Browse files
committed
pindex->stakeModifier
1 parent 11dc3ed commit 55194f7

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/ain-ocean/src/indexer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub struct BlockV2Info {
2929
pub size: usize,
3030
pub size_stripped: usize,
3131
pub weight: i64,
32+
pub stake_modifier: String,
3233
pub minter: String,
3334
pub masternode: String,
3435
pub reward: String,
@@ -61,8 +62,7 @@ pub fn index_block(encoded_block: String, info: &BlockV2Info) -> Result<()> {
6162
masternode: info.masternode.to_owned(),
6263
minter: info.minter.to_owned(),
6364
minter_block_count: info.minter_block_count,
64-
// stake_modifier: String::from_utf8(block.header.stake_modifier.to_vec()).unwrap(), // TODO
65-
stake_modifier: "".to_string(),
65+
stake_modifier: info.stake_modifier.to_owned(),
6666
merkleroot: block.header.merkle_root.to_string(),
6767
size: info.size,
6868
size_stripped: info.size_stripped,

lib/ain-rs-exports/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ pub mod ffi {
6262
pub size: usize,
6363
pub size_stripped: usize,
6464
pub weight: i64,
65+
pub stake_modifier: String,
6566
pub minter: String,
6667
pub masternode: String,
6768
pub reward: String,

lib/ain-rs-exports/src/ocean.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub fn convert(b: &BlockV2InfoFFI) -> BlockV2Info {
1212
size: b.size,
1313
size_stripped: b.size_stripped,
1414
weight: b.weight,
15+
stake_modifier: b.stake_modifier.to_owned(),
1516
minter: b.minter.to_owned(),
1617
masternode: b.masternode.to_owned(),
1718
reward: b.reward.to_owned(),

0 commit comments

Comments
 (0)