cuprate-hinto-janai/test-utils/src/data
Boog900 4169c45c58
Blockchain: add alt-block handling (#260)
* add new tables & types

* add function to fully add an alt block

* resolve current todo!s

* add new requests

* WIP: starting re-orgs

* add last service request

* commit Cargo.lock

* add test

* more docs + cleanup + alt blocks request

* clippy + fmt

* document types

* move tx_fee to helper

* more doc updates

* fmt

* fix imports

* fix fee

* Apply suggestions from code review

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>

* remove default features from `cuprate-helper`

* review fixes

* fix find_block

* add a test and fix some issues in chain history

* fix clippy

* fmt

* Apply suggestions from code review

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>

* add dev dep

* cargo update

* move `flush_alt_blocks`

* review fixes

* more review fixes

* fix clippy

* remove INVARIANT comments

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-09-19 16:55:28 +01:00
..
block test-utils: return &'static verified superset types (#108) 2024-04-21 01:34:04 +01:00
tx test-utils: return &'static verified superset types (#108) 2024-04-21 01:34:04 +01:00
constants.rs update monero-serai (#201) 2024-08-07 00:48:53 +01:00
mod.rs Blockchain: add alt-block handling (#260) 2024-09-19 16:55:28 +01:00
README.md test-utils: add data/ (#107) 2024-04-13 02:13:46 +01:00
statics.rs Blockchain: add alt-block handling (#260) 2024-09-19 16:55:28 +01:00

Data

This module contains:

  • Raw binary, hex, or JSON data for testing purposes

  • Functions to access that data, either raw or typed

  • .bin is a data blob, directly deserializable into types, e.g. monero_serai::block::Block::read::<&[u8]>(&mut blob)

  • .hex is just a hex string of the blob

  • .json is just the data in regular JSON form (as it would be from a JSON-RPC response)

Actual data

Directory File naming scheme Example
block/ $block_hash.{bin,hex,json} bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698.bin
tx/ $tx_hash.{bin,hex,json} 84d48dc11ec91950f8b70a85af9db91fe0c8abef71ef5db08304f7344b99ea66.bin