mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 12:56:12 +00:00
Add attester/proposer slashing endpoints (#856)
* Remove deprecated api_spec.yaml * add prototype for proposer slashing * remove clippy warnings * Add proposer_slashing API * Prototype for attester slashing API call * Fix logic error in operation pool * Finish test for attester_slashing api call * Clean proposer_slashing test * Cargo fmt * Remove useless to_string after format! macro * Cargo fmt * Update book with new api calls * Re-enable proposer slashing verification * Update book with appropriate test example * Fix proposer_slashing test * Update comments and tests for clearer code * Remove extraneous comments * Fix test * Minor fix * Address reviewer comments Co-authored-by: pscott <30843220+pscott@users.noreply.github.com>
This commit is contained in:
@@ -377,7 +377,7 @@ impl<T: EthSpec> TestingBeaconBlockBuilder<T> {
|
||||
/// Builds an `ProposerSlashing` for some `validator_index`.
|
||||
///
|
||||
/// Signs the message using a `BeaconChainHarness`.
|
||||
fn build_proposer_slashing<T: EthSpec>(
|
||||
pub fn build_proposer_slashing<T: EthSpec>(
|
||||
test_task: ProposerSlashingTestTask,
|
||||
validator_index: u64,
|
||||
secret_key: &SecretKey,
|
||||
@@ -396,7 +396,7 @@ fn build_proposer_slashing<T: EthSpec>(
|
||||
/// Builds an `AttesterSlashing` for some `validator_indices`.
|
||||
///
|
||||
/// Signs the message using a `BeaconChainHarness`.
|
||||
fn build_double_vote_attester_slashing<T: EthSpec>(
|
||||
pub fn build_double_vote_attester_slashing<T: EthSpec>(
|
||||
test_task: AttesterSlashingTestTask,
|
||||
validator_indices: &[u64],
|
||||
secret_keys: &[&SecretKey],
|
||||
|
||||
Reference in New Issue
Block a user