-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pass rpcHandler to plugin (+refactor for import cycle)
- Loading branch information
rian
committed
Aug 16, 2024
1 parent
626cf58
commit 109fa90
Showing
4 changed files
with
38 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package junopluginsync | ||
|
||
import ( | ||
"github.com/NethermindEth/juno/core" | ||
"github.com/NethermindEth/juno/core/felt" | ||
) | ||
|
||
type BlockAndStateUpdate struct { | ||
Block *core.Block | ||
StateUpdate *core.StateUpdate | ||
} | ||
|
||
type JunoPlugin interface { | ||
NewBlock(block *core.Block, stateUpdate *core.StateUpdate, newClasses map[felt.Felt]core.Class) error | ||
// The state is reverted by applying a write operation with the reverseStateDiff's StorageDiffs, Nonces, and ReplacedClasses, | ||
// and a delete option with its DeclaredV0Classes, DeclaredV1Classes, and ReplacedClasses. | ||
RevertBlock(from, to *BlockAndStateUpdate, reverseStateDiff *core.StateDiff) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters