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
68fff679
Commit
68fff679
authored
Dec 03, 2021
by
yxq
Committed by
vipwzw
Dec 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor fork
parent
8d62c538
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
44 additions
and
40 deletions
+44
-40
types.go
plugin/dapp/autonomy/types/types.go
+2
-2
types.go
plugin/dapp/blackwhite/types/types.go
+2
-2
evm.go
plugin/dapp/evm/types/evm.go
+6
-6
hashlock.go
plugin/dapp/hashlock/types/hashlock.go
+1
-1
type.go
plugin/dapp/paracross/types/type.go
+6
-6
privacy.go
plugin/dapp/privacy/types/privacy.go
+1
-1
relay.go
plugin/dapp/relay/types/relay.go
+1
-1
retrieve_unit_test.go
plugin/dapp/retrieve/executor/retrieve_unit_test.go
+3
-2
types.go
plugin/dapp/retrieve/types/types.go
+2
-2
ticket.go
plugin/dapp/ticket/types/ticket.go
+2
-2
token_new_test.go
plugin/dapp/token/executor/token_new_test.go
+2
-0
token_test.go
plugin/dapp/token/executor/token_test.go
+1
-0
types.go
plugin/dapp/token/types/types.go
+6
-6
trade.go
plugin/dapp/trade/types/trade.go
+6
-6
types.go
plugin/dapp/unfreeze/types/types.go
+2
-2
kvmvcc_mavl.go
plugin/store/kvmvccmavl/kvmvcc_mavl.go
+1
-1
No files found.
plugin/dapp/autonomy/types/types.go
View file @
68fff679
...
...
@@ -29,8 +29,8 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
AutonomyX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
AutonomyX
,
ForkAutonomyDelRule
,
950000
0
)
cfg
.
RegisterDappFork
(
AutonomyX
,
ForkAutonomyEnableItem
,
1000000
0
)
cfg
.
RegisterDappFork
(
AutonomyX
,
ForkAutonomyDelRule
,
0
)
cfg
.
RegisterDappFork
(
AutonomyX
,
ForkAutonomyEnableItem
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/blackwhite/types/types.go
View file @
68fff679
...
...
@@ -30,8 +30,8 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
BlackwhiteX
,
"ForkBlackWhiteV2"
,
90000
0
)
cfg
.
RegisterDappFork
(
BlackwhiteX
,
"Enable"
,
85000
0
)
cfg
.
RegisterDappFork
(
BlackwhiteX
,
"ForkBlackWhiteV2"
,
0
)
cfg
.
RegisterDappFork
(
BlackwhiteX
,
"Enable"
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/evm/types/evm.go
View file @
68fff679
...
...
@@ -29,17 +29,17 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
ExecutorName
,
EVMEnable
,
50000
0
)
cfg
.
RegisterDappFork
(
ExecutorName
,
EVMEnable
,
0
)
// EVM合约中的数据分散存储,支持大数据量
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMState
,
65000
0
)
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMState
,
0
)
// EVM合约状态数据生成哈希,保存在主链的StateDB中
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMKVHash
,
100000
0
)
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMKVHash
,
0
)
// EVM合约支持ABI绑定和调用
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMABI
,
125000
0
)
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMABI
,
0
)
// EEVM合约用户金额冻结
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMFrozen
,
130000
0
)
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMFrozen
,
0
)
// EEVM 黄皮v1分叉高度
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMYoloV1
,
950000
0
)
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMYoloV1
,
0
)
// EVM合约支持交易组
cfg
.
RegisterDappFork
(
ExecutorName
,
ForkEVMTxGroup
,
0
)
}
...
...
plugin/dapp/hashlock/types/hashlock.go
View file @
68fff679
...
...
@@ -26,7 +26,7 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
HashlockX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
HashlockX
,
ForkBadRepeatSecretX
,
2715575
)
cfg
.
RegisterDappFork
(
HashlockX
,
ForkBadRepeatSecretX
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/paracross/types/type.go
View file @
68fff679
...
...
@@ -64,12 +64,12 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
ParaX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
ParaX
,
"ForkParacrossWithdrawFromParachain"
,
129860
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkCommitTx
,
185000
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkLoopCheckCommitTxDone
,
323000
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaAssetTransferRbk
,
450000
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaSupervision
,
600000
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaAutonomySuperGroup
,
1020000
0
)
cfg
.
RegisterDappFork
(
ParaX
,
"ForkParacrossWithdrawFromParachain"
,
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkCommitTx
,
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkLoopCheckCommitTxDone
,
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaAssetTransferRbk
,
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaSupervision
,
0
)
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaAutonomySuperGroup
,
0
)
//只在平行链启用
cfg
.
RegisterDappFork
(
ParaX
,
ForkParaSelfConsStages
,
types
.
MaxHeight
)
...
...
plugin/dapp/privacy/types/privacy.go
View file @
68fff679
...
...
@@ -47,7 +47,7 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
PrivacyX
,
"Enable"
,
98000
0
)
cfg
.
RegisterDappFork
(
PrivacyX
,
"Enable"
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/relay/types/relay.go
View file @
68fff679
...
...
@@ -56,7 +56,7 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
RelayX
,
"Enable"
,
57000
0
)
cfg
.
RegisterDappFork
(
RelayX
,
"Enable"
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/retrieve/executor/retrieve_unit_test.go
View file @
68fff679
...
...
@@ -9,9 +9,8 @@ import (
"errors"
"fmt"
"math/rand"
"testing"
"strings"
"testing"
"github.com/33cn/chain33/client"
"github.com/33cn/chain33/common/address"
...
...
@@ -250,6 +249,8 @@ func TestExecDelLocalBackup(t *testing.T) {
func
constructRetrieveInstance
()
drivers
.
Driver
{
cfgstring
:=
strings
.
Replace
(
types
.
GetDefaultCfgstring
(),
"Title=
\"
local
\"
"
,
"Title=
\"
chain33
\"
"
,
1
)
chainTestCfg
:=
types
.
NewChain33Config
(
cfgstring
)
chainTestCfg
.
SetDappFork
(
rt
.
RetrieveX
,
rt
.
ForkRetriveX
,
180000
)
chainTestCfg
.
SetDappFork
(
rt
.
RetrieveX
,
rt
.
ForkRetriveAssetX
,
3150000
)
Init
(
rt
.
RetrieveX
,
chainTestCfg
,
nil
)
q
:=
queue
.
New
(
"channel"
)
q
.
SetConfig
(
chainTestCfg
)
...
...
plugin/dapp/retrieve/types/types.go
View file @
68fff679
...
...
@@ -20,8 +20,8 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
RetrieveX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
RetrieveX
,
ForkRetriveX
,
18000
0
)
cfg
.
RegisterDappFork
(
RetrieveX
,
ForkRetriveAssetX
,
315000
0
)
cfg
.
RegisterDappFork
(
RetrieveX
,
ForkRetriveX
,
0
)
cfg
.
RegisterDappFork
(
RetrieveX
,
ForkRetriveAssetX
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/ticket/types/ticket.go
View file @
68fff679
...
...
@@ -78,8 +78,8 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
TicketX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
TicketX
,
"ForkTicketId"
,
106200
0
)
cfg
.
RegisterDappFork
(
TicketX
,
"ForkTicketVrf"
,
177000
0
)
cfg
.
RegisterDappFork
(
TicketX
,
"ForkTicketId"
,
0
)
cfg
.
RegisterDappFork
(
TicketX
,
"ForkTicketVrf"
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/token/executor/token_new_test.go
View file @
68fff679
...
...
@@ -437,6 +437,8 @@ func getprivkey(key string) crypto.PrivKey {
func
TestToken_validSymbolWithHeight
(
t
*
testing
.
T
)
{
cfg
:=
types
.
NewChain33Config
(
strings
.
Replace
(
types
.
GetDefaultCfgstring
(),
"Title=
\"
local
\"
"
,
"Title=
\"
chain33
\"
"
,
1
))
cfg
.
SetDappFork
(
pty
.
TokenX
,
pty
.
ForkBadTokenSymbolX
,
184000
)
cfg
.
SetDappFork
(
pty
.
TokenX
,
pty
.
ForkTokenSymbolWithNumberX
,
1298600
)
forkBadTokenSymbol
:=
cfg
.
GetDappFork
(
pty
.
TokenX
,
pty
.
ForkBadTokenSymbolX
)
forkTokenSymbolWithNumber
:=
cfg
.
GetDappFork
(
pty
.
TokenX
,
pty
.
ForkTokenSymbolWithNumberX
)
t
.
Log
(
"x"
,
"1"
,
forkBadTokenSymbol
,
"2"
,
forkTokenSymbolWithNumber
)
...
...
plugin/dapp/token/executor/token_test.go
View file @
68fff679
...
...
@@ -46,6 +46,7 @@ var (
func
TestToken
(
t
*
testing
.
T
)
{
cfg
:=
types
.
NewChain33Config
(
strings
.
Replace
(
types
.
GetDefaultCfgstring
(),
"Title=
\"
local
\"
"
,
"Title=
\"
chain33
\"
"
,
1
))
cfg
.
SetDappFork
(
pty
.
TokenX
,
pty
.
ForkTokenCheckX
,
1600000
)
Init
(
pty
.
TokenX
,
cfg
,
nil
)
tokenTotal
:=
int64
(
10000
*
1e8
)
tokenBurn
:=
int64
(
10
*
1e8
)
...
...
plugin/dapp/token/types/types.go
View file @
68fff679
...
...
@@ -23,12 +23,12 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
TokenX
,
"Enable"
,
100899
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenBlackListX
,
19000
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkBadTokenSymbolX
,
18400
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenPriceX
,
56000
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenSymbolWithNumberX
,
129860
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenCheckX
,
160000
0
)
cfg
.
RegisterDappFork
(
TokenX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenBlackListX
,
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkBadTokenSymbolX
,
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenPriceX
,
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenSymbolWithNumberX
,
0
)
cfg
.
RegisterDappFork
(
TokenX
,
ForkTokenCheckX
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/trade/types/trade.go
View file @
68fff679
...
...
@@ -59,12 +59,12 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
TradeX
,
"Enable"
,
100899
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeBuyLimitX
,
30100
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeAssetX
,
101000
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeIDX
,
145000
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeFixAssetDBX
,
250000
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradePriceX
,
315000
0
)
cfg
.
RegisterDappFork
(
TradeX
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeBuyLimitX
,
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeAssetX
,
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeIDX
,
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradeFixAssetDBX
,
0
)
cfg
.
RegisterDappFork
(
TradeX
,
ForkTradePriceX
,
0
)
}
//InitExecutor ...
...
...
plugin/dapp/unfreeze/types/types.go
View file @
68fff679
...
...
@@ -30,8 +30,8 @@ func init() {
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
name
=
UnfreezeX
cfg
.
RegisterDappFork
(
name
,
"Enable"
,
0
)
cfg
.
RegisterDappFork
(
name
,
ForkTerminatePartX
,
129860
0
)
cfg
.
RegisterDappFork
(
name
,
ForkUnfreezeIDX
,
145000
0
)
cfg
.
RegisterDappFork
(
name
,
ForkTerminatePartX
,
0
)
cfg
.
RegisterDappFork
(
name
,
ForkUnfreezeIDX
,
0
)
}
//InitExecutor ...
...
...
plugin/store/kvmvccmavl/kvmvcc_mavl.go
View file @
68fff679
...
...
@@ -67,7 +67,7 @@ func init() {
//InitFork ...
func
InitFork
(
cfg
*
types
.
Chain33Config
)
{
cfg
.
RegisterDappFork
(
"store-kvmvccmavl"
,
"ForkKvmvccmavl"
,
187
*
1000
0
)
cfg
.
RegisterDappFork
(
"store-kvmvccmavl"
,
"ForkKvmvccmavl"
,
0
)
}
// KVmMavlStore provide kvmvcc and mavl store interface implementation
...
...
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