Skip to content

Commit

Permalink
fixed misspell. (ontio#489)
Browse files Browse the repository at this point in the history
Signed-off-by: junjie <[email protected]>
  • Loading branch information
Arbio5zt authored and laizy committed Jun 30, 2018
1 parent 70ac99d commit ab0786a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func SetOntologyConfig(ctx *cli.Context) (*config.OntologyConfig, error) {
cfg.Consensus.EnableConsensus = true
cfg.P2PNode.NetworkId = config.NETWORK_ID_SOLO_NET
cfg.P2PNode.NetworkName = config.GetNetworkName(cfg.P2PNode.NetworkId)
cfg.P2PNode.NetworkMaigc = config.GetNetworkMagic(cfg.P2PNode.NetworkId)
cfg.P2PNode.NetworkMagic = config.GetNetworkMagic(cfg.P2PNode.NetworkId)
}
return cfg, nil
}
Expand Down Expand Up @@ -133,7 +133,7 @@ func setConsensusConfig(ctx *cli.Context, cfg *config.ConsensusConfig) {

func setP2PNodeConfig(ctx *cli.Context, cfg *config.P2PNodeConfig) {
cfg.NetworkId = uint32(ctx.GlobalUint(utils.GetFlagName(utils.NetworkIdFlag)))
cfg.NetworkMaigc = config.GetNetworkMagic(cfg.NetworkId)
cfg.NetworkMagic = config.GetNetworkMagic(cfg.NetworkId)
cfg.NetworkName = config.GetNetworkName(cfg.NetworkId)
cfg.NodePort = ctx.GlobalUint(utils.GetFlagName(utils.NodePortFlag))
cfg.NodeConsensusPort = ctx.GlobalUint(utils.GetFlagName(utils.ConsensusPortFlag))
Expand Down
4 changes: 2 additions & 2 deletions common/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ type P2PRsvConfig struct {
type P2PNodeConfig struct {
ReservedPeersOnly bool
ReservedCfg *P2PRsvConfig
NetworkMaigc uint32
NetworkMagic uint32
NetworkId uint32
NetworkName string
NodePort uint
Expand Down Expand Up @@ -561,7 +561,7 @@ func NewOntologyConfig() *OntologyConfig {
ReservedPeersOnly: false,
NetworkId: NETWORK_ID_MAIN_NET,
NetworkName: GetNetworkName(NETWORK_ID_POLARIS_NET),
NetworkMaigc: GetNetworkMagic(NETWORK_ID_POLARIS_NET),
NetworkMagic: GetNetworkMagic(NETWORK_ID_POLARIS_NET),
NodePort: DEFAULT_NODE_PORT,
NodeConsensusPort: DEFAULT_CONSENSUS_PORT,
DualPortSupport: true,
Expand Down
2 changes: 1 addition & 1 deletion core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Transaction struct {
Payer common.Address
Payload Payload
//Attributes []*TxAttribute
attributes byte //this must be 0 now, Attribute Array length use VarUint encoding, so byte is enough for extention
attributes byte //this must be 0 now, Attribute Array length use VarUint encoding, so byte is enough for extension
Sigs []*Sig

hash *common.Uint256
Expand Down
4 changes: 2 additions & 2 deletions http/base/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ func GetBlockTransactions(block *types.Block) interface{} {
}

//NewNativeInvokeTransaction return native contract invoke transaction
func NewNativeInvokeTransaction(gasPirce, gasLimit uint64, contractAddress common.Address, verison byte, method string, params []interface{}) (*types.Transaction, error) {
invokeCode, err := BuildNativeInvokeCode(contractAddress, verison, method, params)
func NewNativeInvokeTransaction(gasPirce, gasLimit uint64, contractAddress common.Address, version byte, method string, params []interface{}) (*types.Transaction, error) {
invokeCode, err := BuildNativeInvokeCode(contractAddress, version, method, params)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions p2pserver/message/types/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func writeMessageHeader(writer io.Writer, msgh messageHeader) error {

func newMessageHeader(cmd string, length uint32, checksum [common.CHECKSUM_LEN]byte) messageHeader {
msgh := messageHeader{}
msgh.Magic = config.DefConfig.P2PNode.NetworkMaigc
msgh.Magic = config.DefConfig.P2PNode.NetworkMagic
copy(msgh.CMD[:], cmd)
msgh.Checksum = checksum
msgh.Length = length
Expand Down Expand Up @@ -93,7 +93,7 @@ func ReadMessage(reader io.Reader) (Message, error) {
return nil, err
}

magic := config.DefConfig.P2PNode.NetworkMaigc
magic := config.DefConfig.P2PNode.NetworkMagic
if hdr.Magic != magic {
return nil, fmt.Errorf("unmatched magic number %d, expected %d", hdr.Magic, magic)
}
Expand Down
2 changes: 1 addition & 1 deletion smartcontract/test/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestMap(t *testing.T) {
//}

for n := 0; n < N; n++ {
// Setup Execution Enviroment
// Setup Execution Environment
//store := statestore.NewMemDatabase()
//testBatch := statestore.NewStateStoreBatch(store, testLevelDB)
config := &smartcontract.Config{
Expand Down

0 comments on commit ab0786a

Please sign in to comment.