mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Add a LibP2P instantiation to coordinator
It's largely unoptimized, and not yet exclusive to validators, yet has basic sanity (using message content for ID instead of sender + index). Fixes bugs as found. Notably, we used a time in milliseconds where the Tributary expected seconds. Also has Tributary::new jump to the presumed round number. This reduces slashes when starting new chains (whose times will be before the current time) and was the only way I was able to observe successful confirmations given current surrounding infrastructure.
This commit is contained in:
@@ -77,7 +77,7 @@ impl Block {
|
||||
self.0.header.number
|
||||
}
|
||||
|
||||
/// Returns the time of this block, set by its producer, as a unix timestamp.
|
||||
/// Returns the time of this block, set by its producer, in milliseconds since the epoch.
|
||||
pub fn time(&self) -> Result<u64, SeraiError> {
|
||||
for extrinsic in &self.0.extrinsics {
|
||||
// Inherent/unsigned
|
||||
|
||||
Reference in New Issue
Block a user