Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejka committed Aug 7, 2024
1 parent 4d39b81 commit 0cdc8b3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mod utils;
mod validation;
pub mod validation;
mod state;
mod main;
6 changes: 1 addition & 5 deletions src/validation.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ pub fn target_to_bits(target: u256) -> Result<u32, felt252> {
Result::Ok(result)
}

fn get_fee_and_merkle_root(self: @ChainState, block: @Block) -> Result<(u256, u256), ByteArray> {

fn fee_and_merkle_root(self: @ChainState, block: @Block) -> Result<(u256, u256), ByteArray> {
let mut txids = ArrayTrait::new();
let mut total_fee = 0;
Expand Down Expand Up @@ -245,9 +243,7 @@ mod tests {
#[test]
fn test_validate_proof_of_work() {
let mut block = Block {
header: Header {
version: 1, prev_block_hash: 1, merkle_root_hash: 1, time: 12, bits: 1, nonce: 1,
},
header: Header { version: 1, prev_block_hash: 1, time: 12, bits: 1, nonce: 1, },
txs: ArrayTrait::new().span(),
};

Expand Down
3 changes: 0 additions & 3 deletions tests/tests.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use core::result::ResultTrait;
use core::option::OptionTrait;
use core::traits::Into;
use raito::validation::target_to_bits;

#[test]
Expand Down

0 comments on commit 0cdc8b3

Please sign in to comment.