Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
d52b87a1
Commit
d52b87a1
authored
Jan 24, 2019
by
jiangpeng
Committed by
vipwzw
Jan 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add subcfg genesis amount
parent
3603d6d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
para.go
plugin/consensus/para/para.go
+4
-1
chain33.para.test.toml
plugin/dapp/paracross/cmd/build/chain33.para.test.toml
+2
-0
chain33.para.toml
plugin/dapp/paracross/cmd/build/chain33.para.toml
+2
-0
No files found.
plugin/consensus/para/para.go
View file @
d52b87a1
...
...
@@ -67,6 +67,7 @@ type client struct {
authAccount
string
privateKey
crypto
.
PrivKey
wg
sync
.
WaitGroup
subCfg
*
subConfig
}
type
subConfig
struct
{
...
...
@@ -77,6 +78,7 @@ type subConfig struct {
AuthAccount
string
`json:"authAccount,omitempty"`
WaitBlocks4CommitMsg
int32
`json:"waitBlocks4CommitMsg,omitempty"`
SearchHashMatchedBlockDepth
int32
`json:"searchHashMatchedBlockDepth,omitempty"`
GenesisAmount
int64
`json:"genesisAmount,omitempty"`
}
// New function to init paracross env
...
...
@@ -134,6 +136,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
authAccount
:
subcfg
.
AuthAccount
,
privateKey
:
priKey
,
isCaughtUp
:
false
,
subCfg
:
&
subcfg
,
}
if
subcfg
.
WaitBlocks4CommitMsg
<
2
{
panic
(
"config WaitBlocks4CommitMsg should not less 2"
)
...
...
@@ -250,7 +253,7 @@ func (client *client) CreateGenesisTx() (ret []*types.Transaction) {
//gen payload
g
:=
&
cty
.
CoinsAction_Genesis
{}
g
.
Genesis
=
&
types
.
AssetsGenesis
{}
g
.
Genesis
.
Amount
=
1e8
*
types
.
Coin
g
.
Genesis
.
Amount
=
client
.
subCfg
.
GenesisAmount
*
types
.
Coin
tx
.
Payload
=
types
.
Encode
(
&
cty
.
CoinsAction
{
Value
:
g
,
Ty
:
cty
.
CoinsActionGenesis
})
ret
=
append
(
ret
,
&
tx
)
return
...
...
plugin/dapp/paracross/cmd/build/chain33.para.test.toml
View file @
d52b87a1
...
...
@@ -99,6 +99,8 @@ emptyBlockInterval=4
authAccount
=
"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
#等待平行链共识消息在主链上链并成功的块数,超出会重发共识消息,最小是2
waitBlocks4CommitMsg
=
2
#创世地址额度
genesisAmount
=
100000000
[store]
name
=
"mavl"
...
...
plugin/dapp/paracross/cmd/build/chain33.para.toml
View file @
d52b87a1
...
...
@@ -101,6 +101,8 @@ authAccount=""
#等待平行链共识消息在主链上链并成功的块数,超出会重发共识消息,最小是2
waitBlocks4CommitMsg
=
2
searchHashMatchedBlockDepth
=
100
#创世地址额度
genesisAmount
=
100000000
[store]
name
=
"mavl"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment