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
fcefc56c
Commit
fcefc56c
authored
Dec 14, 2018
by
vipwzw
Committed by
33cn
Dec 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update chain33
parent
6e73f767
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
6 deletions
+22
-6
create_plugin_file_template.go
...chain33/cmd/tools/strategy/create_plugin_file_template.go
+1
-0
address.go
vendor/github.com/33cn/chain33/common/address/address.go
+9
-4
address_test.go
...or/github.com/33cn/chain33/common/address/address_test.go
+1
-1
driver.go
vendor/github.com/33cn/chain33/system/dapp/driver.go
+6
-1
config_merge_test.go
vendor/github.com/33cn/chain33/types/config_merge_test.go
+1
-0
fork.go
vendor/github.com/33cn/chain33/types/fork.go
+2
-0
bityuan.toml
vendor/github.com/33cn/chain33/types/testdata/bityuan.toml
+1
-0
local.mvertest.toml
...ithub.com/33cn/chain33/types/testdata/local.mvertest.toml
+1
-0
No files found.
vendor/github.com/33cn/chain33/cmd/tools/strategy/create_plugin_file_template.go
View file @
fcefc56c
...
@@ -220,6 +220,7 @@ ForkResetTx0= 200000
...
@@ -220,6 +220,7 @@ ForkResetTx0= 200000
ForkWithdraw= 200000
ForkWithdraw= 200000
ForkExecRollback= 450000
ForkExecRollback= 450000
ForkCheckBlockTime=1200000
ForkCheckBlockTime=1200000
ForkMultiSignAddress=1500000
ForkTxHeight= -1
ForkTxHeight= -1
ForkTxGroupPara= -1
ForkTxGroupPara= -1
ForkChainParamV2= -1
ForkChainParamV2= -1
...
...
vendor/github.com/33cn/chain33/common/address/address.go
View file @
fcefc56c
...
@@ -20,7 +20,12 @@ var addressCache *lru.Cache
...
@@ -20,7 +20,12 @@ var addressCache *lru.Cache
var
checkAddressCache
*
lru
.
Cache
var
checkAddressCache
*
lru
.
Cache
var
multisignCache
*
lru
.
Cache
var
multisignCache
*
lru
.
Cache
var
multiCheckAddressCache
*
lru
.
Cache
var
multiCheckAddressCache
*
lru
.
Cache
var
errVersion
=
errors
.
New
(
"check version error"
)
// ErrCheckVersion :
var
ErrCheckVersion
=
errors
.
New
(
"check version error"
)
//ErrCheckChecksum :
var
ErrCheckChecksum
=
errors
.
New
(
"Address Checksum error"
)
//MaxExecNameLength 执行器名最大长度
//MaxExecNameLength 执行器名最大长度
const
MaxExecNameLength
=
100
const
MaxExecNameLength
=
100
...
@@ -121,11 +126,11 @@ func checkAddress(ver byte, addr string) (e error) {
...
@@ -121,11 +126,11 @@ func checkAddress(ver byte, addr string) (e error) {
if
len
(
dec
)
==
25
{
if
len
(
dec
)
==
25
{
sh
:=
common
.
Sha2Sum
(
dec
[
0
:
21
])
sh
:=
common
.
Sha2Sum
(
dec
[
0
:
21
])
if
!
bytes
.
Equal
(
sh
[
:
4
],
dec
[
21
:
25
])
{
if
!
bytes
.
Equal
(
sh
[
:
4
],
dec
[
21
:
25
])
{
e
=
errors
.
New
(
"Address Checksum error"
)
e
=
ErrCheckChecksum
}
}
}
}
if
dec
[
0
]
!=
ver
{
if
dec
[
0
]
!=
ver
{
e
=
err
Version
e
=
ErrCheck
Version
}
}
return
e
return
e
}
}
...
@@ -170,7 +175,7 @@ func NewAddrFromString(hs string) (a *Address, e error) {
...
@@ -170,7 +175,7 @@ func NewAddrFromString(hs string) (a *Address, e error) {
if
len
(
dec
)
==
25
{
if
len
(
dec
)
==
25
{
sh
:=
common
.
Sha2Sum
(
dec
[
0
:
21
])
sh
:=
common
.
Sha2Sum
(
dec
[
0
:
21
])
if
!
bytes
.
Equal
(
sh
[
:
4
],
dec
[
21
:
25
])
{
if
!
bytes
.
Equal
(
sh
[
:
4
],
dec
[
21
:
25
])
{
e
=
errors
.
New
(
"Address Checksum error"
)
e
=
ErrCheckChecksum
}
else
{
}
else
{
a
=
new
(
Address
)
a
=
new
(
Address
)
a
.
Version
=
dec
[
0
]
a
.
Version
=
dec
[
0
]
...
...
vendor/github.com/33cn/chain33/common/address/address_test.go
View file @
fcefc56c
...
@@ -42,7 +42,7 @@ func TestMultiSignAddress(t *testing.T) {
...
@@ -42,7 +42,7 @@ func TestMultiSignAddress(t *testing.T) {
addr
:=
MultiSignAddress
(
key
.
PubKey
()
.
Bytes
())
addr
:=
MultiSignAddress
(
key
.
PubKey
()
.
Bytes
())
assert
.
Equal
(
t
,
addr1
,
addr
)
assert
.
Equal
(
t
,
addr1
,
addr
)
err
:=
CheckAddress
(
addr
)
err
:=
CheckAddress
(
addr
)
assert
.
Equal
(
t
,
err
Version
,
err
)
assert
.
Equal
(
t
,
ErrCheck
Version
,
err
)
err
=
CheckMultiSignAddress
(
addr
)
err
=
CheckMultiSignAddress
(
addr
)
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
t
.
Log
(
addr
)
t
.
Log
(
addr
)
...
...
vendor/github.com/33cn/chain33/system/dapp/driver.go
View file @
fcefc56c
...
@@ -232,7 +232,12 @@ func CheckAddress(addr string, height int64) error {
...
@@ -232,7 +232,12 @@ func CheckAddress(addr string, height int64) error {
if
IsDriverAddress
(
addr
,
height
)
{
if
IsDriverAddress
(
addr
,
height
)
{
return
nil
return
nil
}
}
return
address
.
CheckAddress
(
addr
)
err
:=
address
.
CheckAddress
(
addr
)
if
!
types
.
IsFork
(
height
,
"ForkMultiSignAddress"
)
&&
err
==
address
.
ErrCheckVersion
{
return
nil
}
return
err
}
}
// Exec call the check exectx subclass, you can also do it without calling , implement your own checktx
// Exec call the check exectx subclass, you can also do it without calling , implement your own checktx
...
...
vendor/github.com/33cn/chain33/types/config_merge_test.go
View file @
fcefc56c
...
@@ -213,6 +213,7 @@ ForkResetTx0= 200000
...
@@ -213,6 +213,7 @@ ForkResetTx0= 200000
ForkWithdraw= 200000
ForkWithdraw= 200000
ForkExecRollback= 450000
ForkExecRollback= 450000
ForkCheckBlockTime=1200000
ForkCheckBlockTime=1200000
ForkMultiSignAddress=1500000
ForkTxHeight= -1
ForkTxHeight= -1
ForkTxGroupPara= -1
ForkTxGroupPara= -1
ForkChainParamV2= -1
ForkChainParamV2= -1
...
...
vendor/github.com/33cn/chain33/types/fork.go
View file @
fcefc56c
...
@@ -205,6 +205,8 @@ func SetTestNetFork() {
...
@@ -205,6 +205,8 @@ func SetTestNetFork() {
systemFork
.
SetFork
(
"chain33"
,
"ForkTxHeight"
,
806578
)
systemFork
.
SetFork
(
"chain33"
,
"ForkTxHeight"
,
806578
)
systemFork
.
SetFork
(
"chain33"
,
"ForkTxGroupPara"
,
806578
)
systemFork
.
SetFork
(
"chain33"
,
"ForkTxGroupPara"
,
806578
)
systemFork
.
SetFork
(
"chain33"
,
"ForkCheckBlockTime"
,
1200000
)
systemFork
.
SetFork
(
"chain33"
,
"ForkCheckBlockTime"
,
1200000
)
systemFork
.
SetFork
(
"chain33"
,
"ForkMultiSignAddress"
,
1500000
)
}
}
func
setLocalFork
()
{
func
setLocalFork
()
{
...
...
vendor/github.com/33cn/chain33/types/testdata/bityuan.toml
View file @
fcefc56c
...
@@ -168,6 +168,7 @@ ForkExecRollback= 450000
...
@@ -168,6 +168,7 @@ ForkExecRollback= 450000
ForkTxHeight
=
-1
ForkTxHeight
=
-1
ForkTxGroupPara
=
-1
ForkTxGroupPara
=
-1
ForkCheckBlockTime
=
1200000
ForkCheckBlockTime
=
1200000
ForkMultiSignAddress
=
1500000
[fork.sub.coins]
[fork.sub.coins]
Enable
=
0
Enable
=
0
...
...
vendor/github.com/33cn/chain33/types/testdata/local.mvertest.toml
View file @
fcefc56c
...
@@ -186,6 +186,7 @@ ForkExecRollback= 450000
...
@@ -186,6 +186,7 @@ ForkExecRollback= 450000
ForkTxHeight
=
-1
ForkTxHeight
=
-1
ForkTxGroupPara
=
-1
ForkTxGroupPara
=
-1
ForkCheckBlockTime
=
1200000
ForkCheckBlockTime
=
1200000
ForkMultiSignAddress
=
1500000
[fork.sub.coins]
[fork.sub.coins]
Enable
=
0
Enable
=
0
...
...
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