Block获取Nonce的接口需要拷贝
Closed this issue · 0 comments
benbaley commented
Hi there,
block.go
func (b *Block) Nonce() []byte { return b.header.Nonce[:] }
这里会形成多指针指向同一块内存,不安全,一旦有地方改了内容,会引发很多难以定位的问题
System information
PlatON version: platon version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop
)
Expected behaviour
Actual behaviour
Steps to reproduce the behaviour
Backtrace
[backtrace]