| 45 | } |
| 46 | |
| 47 | pub trait BaseTransaction { |
| 48 | fn name(&self) -> &'static str; |
| 49 | // fn initialize(&mut self, context: &dyn BaseContext); |
| 50 | |
| 51 | // TODO: Use musig2 to aggregate signatures |
| 52 | // fn pre_sign(&mut self, context: &dyn BaseContext); |
| 53 | |
| 54 | // TODO: Implement default that goes through all leaves and checks if one of them is executable |
| 55 | // TODO: Return a Result with an Error in case the witness can't be created |
| 56 | fn finalize(&self) -> Transaction; |
| 57 | } |
| 58 | |
| 59 | pub const fn relay_fee(vsize: usize) -> u64 { |
| 60 | (vsize as f32 * RELAY_FEE_BUFFER_MULTIPLIER) as u64 * MIN_RELAY_FEE_RATE |
nothing calls this directly
no outgoing calls
no test coverage detected