Skip to content

Commit

Permalink
comments: add comments to clarify flags and byte codes (bnb-chain#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing authored and j75689 committed Feb 13, 2023
1 parent df4000a commit 9211660
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions core/systemcontracts/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ var (
)

func init() {

// For contract upgrades, the following information is from `bsc-genesis-contract`, to be specifically,
// 1) `CommitUrl` is the specific git commit, based on which the byte code is compiled from;
// 2) `Code` is the byte code of the contract, which is generated by compiling `bsc-genesis-contract`.
// You can refer to `https://github.com/bnb-chain/bsc-genesis-contract` to compile the smart contracts and do the verification.

ramanujanUpgrade[rialtoNet] = &Upgrade{
UpgradeName: "ramanujan",
Configs: []*UpgradeConfig{
Expand Down
11 changes: 9 additions & 2 deletions eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,15 @@ type Config struct {
Genesis *core.Genesis `toml:",omitempty"`

// Protocol options
NetworkId uint64 // Network ID to use for selecting peers to connect to
SyncMode downloader.SyncMode
NetworkId uint64 // Network ID to use for selecting peers to connect to
SyncMode downloader.SyncMode

// DisablePeerTxBroadcast is an optional config and disabled by default, and usually you do not need it.
// When this flag is enabled, you are requesting remote peers to stop broadcasting new transactions to you, and
// it does not mean that your node will stop broadcasting transactions to remote peers.
// If your node does care about new mempool transactions (e.g., running rpc services without the need of mempool
// transactions) or is continuously under high pressure (e.g., mempool is always full), then you can consider
// to turn it on.
DisablePeerTxBroadcast bool

// This can be set to list of enrtree:// URLs which will be queried for
Expand Down

0 comments on commit 9211660

Please sign in to comment.