-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(ingress-egress-tracker): remove unnecessary fields #4425
Conversation
destination: String, | ||
value: f64, | ||
value: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed this to return sats because that's our practice across the board
const EVENT_BUFFER_SIZE: usize = 1024; | ||
let (witness_sender, _) = | ||
tokio::sync::broadcast::channel::<state_chain_runtime::RuntimeCall>(EVENT_BUFFER_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer need to multicast the witnessing calls to different websockets so i removed the channel logic
let mut map = serializer.serialize_map(Some(3))?; | ||
map.serialize_entry("confirmations", &self.confirmations)?; | ||
map.serialize_entry("tx_hash", &self.tx_hash)?; | ||
map.serialize_entry("value", &format!("0x{:x}", self.value))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hex encode the u64
enum TransactionId { | ||
Bitcoin { hash: String }, | ||
Ethereum { signature: SchnorrVerificationComponents }, | ||
Polkadot { signature: String }, | ||
} | ||
|
||
#[derive(Serialize)] | ||
#[serde(tag = "type", rename_all = "snake_case")] | ||
#[serde(untagged)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this tag is part of the key in redis so it doesn't need to be serialized
@@ -15,46 +15,22 @@ use serde::Serialize; | |||
use utilities::rpc::NumberOrHex; | |||
|
|||
#[derive(Serialize)] | |||
pub struct WitnessAsset { | |||
pub chain: ForeignChain, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the chain is part of the key in redis so it doesn't need to be serialized
|
||
#[derive(Serialize)] | ||
#[serde(tag = "deposit_chain")] | ||
#[serde(untagged)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this tag is part of the key in redis so it doesn't need to be serialized
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4425 +/- ##
=====================================
- Coverage 72% 72% -0%
=====================================
Files 396 396
Lines 67426 67410 -16
Branches 67426 67410 -16
=====================================
- Hits 48582 48534 -48
- Misses 16400 16434 +34
+ Partials 2444 2442 -2 ☔ View full report in Codecov by Sentry. |
…itness-swap * origin/main: (24 commits) fix: restore correct restriction on redemption expiry (PRO-1072) Feat/migrate-to-polkadot-sdk-repo (#4361) chore: fix RUSTSEC-2024-0003 (#4426) Feat: decouple CFE from SC events (#4382) chore: add docker tag prefix to `chainflip-ingress-egress-tacker` 🏷️ (#4427) refactor/PRO-1101: rid of swapping minimum swap amount (#4419) refactor(ingress-egress-tracker): remove unnecessary fields (#4425) Improved the retry queue storage (#4420) fix: bump spec version command only bumps when necessary (#4422) refactor: use yargs for all try_runtime_command options (#4423) fix: await finalisation before starting broker (#4412) chore: debug logs to see get_raw_txs query (#4413) doc: correct env vars (#4416) fix: pool_orders rpc filters empty orders (PRO-1039) (#4377) Produce an event in case the swap yields a zero egress amount (#4410) fix: don't have conflicting redis port with localnet (#4415) Ability to specify output for the subcommands, other than `/dev/null` (#4411) chore: increase limit on max number of bitcoin payloads in a ceremony to theoretical maximum (#4396) refactor(ingress-egress-tracker): configurable expiry times [WEB-761] (#4406) fix: use existing script for upgrade job (#4403) ... # Conflicts: # Cargo.lock # state-chain/primitives/Cargo.toml
Pull Request
Closes: PRO-xxx
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Please include a succinct description of the purpose and content of the PR. What problem does it solve, and how? Link issues, discussions, other PRs, and anything else that will help the reviewer.