-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR updates `core` and `coreutils` and splits the subscriber logic off into its own package called `chain`. This PR is the last step in migrating to the `coreutils` types and the new subscriber pattern.
- Loading branch information
Showing
39 changed files
with
1,273 additions
and
2,170 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
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,26 @@ | ||
package chain | ||
|
||
import ( | ||
"go.sia.tech/core/consensus" | ||
"go.sia.tech/core/types" | ||
"go.sia.tech/coreutils/chain" | ||
) | ||
|
||
type ( | ||
Manager = chain.Manager | ||
HostAnnouncement = chain.HostAnnouncement | ||
ApplyUpdate = chain.ApplyUpdate | ||
RevertUpdate = chain.RevertUpdate | ||
) | ||
|
||
func TestnetZen() (*consensus.Network, types.Block) { | ||
return chain.TestnetZen() | ||
} | ||
|
||
func NewDBStore(db chain.DB, n *consensus.Network, genesisBlock types.Block) (_ *chain.DBStore, _ consensus.State, err error) { | ||
return chain.NewDBStore(db, n, genesisBlock) | ||
} | ||
|
||
func NewManager(store chain.Store, cs consensus.State) *Manager { | ||
return chain.NewManager(store, cs) | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.