Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Modules/Common/BeaconChainLikeAttestationsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ abstract class BeaconChainLikeAttestationsModule extends CoreModule

public ?BlockHashFormat $block_hash_format = BlockHashFormat::HexWithout0x;
public ?AddressFormat $address_format = AddressFormat::AlphaNumeric;
public ?TransactionHashFormat $transaction_hash_format = TransactionHashFormat::None;
public ?TransactionRenderModel $transaction_render_model = TransactionRenderModel::None;
public ?TransactionHashFormat $transaction_hash_format = TransactionHashFormat::AlphaNumeric;
public ?TransactionRenderModel $transaction_render_model = TransactionRenderModel::Mixed;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted, see 7c879b1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u please help me I only just seen this messsge sorry

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And how do I do that sorry

public ?FeeRenderModel $fee_render_model = FeeRenderModel::None;
public ?PrivacyModel $privacy_model = PrivacyModel::Transparent;

Expand Down Expand Up @@ -186,13 +186,19 @@ final public function pre_process_block($block) // $block here is an epoch numbe
{
$events[] = [
'block' => $block,
'sort_key' => $key_tes++,
'time' => $this->block_time,
'address' => (string)$validator,
'effect' => $reward,
];
}

usort($events, function ($a, $b) {
return (strcmp($a['address'], $b['address']));
});

foreach($events as &$ev)
$ev['sort_key'] = $key_tes++;

$this->set_return_events($events);
}
}
10 changes: 9 additions & 1 deletion Modules/Common/BeaconChainLikeDepositsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,29 @@ final public function pre_process_block($block) // $block here is an epoch numbe
];
}
}
$this->set_return_events($events);
return;
}

foreach ($deposits as [$index, $address, $amount, $slot, $deposit_address])
{
$events[] = [
'block' => $block,
'transaction' => $slot,
'sort_key' => $key_tes++,
'time' => $this->block_time,
'address' => (string)$index,
'effect' => $amount,
'extra_indexed' => (string)$deposit_address
];
}

usort($events, function ($a, $b) {
return (strcmp($a['transaction'], $b['transaction']));
});

foreach($events as &$ev)
$ev['sort_key'] = $key_tes++;

$this->set_return_events($events);
}

Expand Down
8 changes: 8 additions & 0 deletions Modules/Common/BeaconChainLikePenaltiesModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ final public function pre_process_block($block) // $block here is an epoch numbe
}
}

usort($proposers_slashing, function ($a, $b) {
return (strcmp($a[1], $b[1]));
});

usort($attestors_slashing, function ($a, $b) {
return (strcmp($a[1], $b[1]));
});

$this->get_epoch_time($block, $slots);

foreach ($slots as $slot => $tm)
Expand Down
1 change: 1 addition & 0 deletions Modules/Common/BeaconChainLikeProposalsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ final public function pre_process_block($block) // $block here is an epoch numbe
}

$key_tes = 0;
ksort($rewards_slots);

foreach ($rewards_slots as $slot => [$validator, $reward])
{
Expand Down
4 changes: 4 additions & 0 deletions Modules/Common/BeaconChainLikeWithdrawalsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ final public function pre_process_block($block) // $block here is an epoch numbe
}
}

usort($withdrawals, function ($a, $b) {
return (strcmp($a[3], $b[3]));
});

$this->get_epoch_time($block, $slots);
$key_tes = 0;

Expand Down