Zhijies-MacBook-Pro:iotex-core zjshen$ make lint-rich
Running golangcli lint...
action/action.go:194:2: ifElseChain: rewrite if-else to switch statement (gocritic)
if pbAct.GetTransfer() != nil {
^
action/putblock.go:99:11: unslice: could simplify nv[:] to nv (gocritic)
Value: nv[:],
^
address/address_v1.go:93:37: unslice: could simplify grouped[:] to grouped (gocritic)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
publicnode: | |
image: jack0818/network:latest | |
ports: | |
- "9082:9082" | |
- "9085:9085" | |
- "2112:2112" | |
- "12345:12345" | |
- "9702:9702" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opts := badger.DefaultOptions | |
opts.Dir = "data1" | |
opts.ValueDir = "data2" | |
opts.TableLoadingMode = options.MemoryMap | |
db, _ := badger.Open(opts) | |
go func() { | |
for { | |
err := db.Update(func(txn *badger.Txn) error { | |
prefix := []byte("abc") | |
for i := 0; i < 10000; i++ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fatal error: runtime: out of memory | |
runtime stack: | |
runtime.throw(0x8ad2d4, 0x16) | |
/usr/lib/go-1.12/src/runtime/panic.go:617 +0x72 | |
runtime.sysMap(0xc338000000, 0xc000000, 0xc5e678) | |
/usr/lib/go-1.12/src/runtime/mem_linux.go:170 +0xc7 | |
runtime.(*mheap).sysAlloc(0xc46220, 0x82ac000, 0xc46230, 0x4156) | |
/usr/lib/go-1.12/src/runtime/malloc.go:633 +0x1cd | |
runtime.(*mheap).grow(0xc46220, 0x4156, 0x0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"jsonrpc":"2.0","id":"2","result":{"candidates":[{"address":"io1qyqsqqqq8kym08lqv4m4t6v3kqcg7qwucvnxjp2p8e594a","pubKey":"c379e42ec31cdf88f48c66f59a6ca5732232a8386121cf91934008a0b8487ef059826f04add9306c43a7b6955864ac7c3196a6b1d859c06a103ebd64283fa0b4f242857548dfd301","totalVote":100000010,"creationHeight":0,"lastUpdateHeight":11,"isDelegate":false,"isProducer":false},{"address":"io1qyqsqqqq3xneru30ezgg0yx9k2c0llzfw2yej389mlnuhm","pubKey":"e3dc2fc3470925da2df9d340a9ce2e5acd731c6f720bd8de434d295f4fa7adc511b13106db08c1480a7ccba5386378df4a35a233fe01963cdcb5e718b31965895ca795a2d7b53e03","totalVote":100000010,"creationHeight":0,"lastUpdateHeight":14,"isDelegate":false,"isProducer":false},{"address":"io1qyqsqqqq4wy5w4zjc6y5hn8zwhsd36py5jsq74yln53vcp","pubKey":"700f139942d93121095dabb3db1a71b170c4078be30cf443b10e5579a52437264b50c500eac957c04e4584821b5bd9027b87b0878edfa3430a98df51b70404dcbe08ed897548d507","totalVote":100000010,"creationHeight":0,"lastUpdateHeight":13,"isDelegate":false,"isProducer":false},{"address": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"jsonrpc":"2.0","id":"2","result":{"candidates":[{"address":"io1qyqsqqqqkegkaens3hec8rxxcu04m7f082emg8glnncg5u","pubKey":"d2d6b394d8b748a8fcdd5fd843a01259fafe37c762b574d6439fdc2fecc7da9bc5000e064030721315484f022c03d50b13d5118fca15d93f11a6d2a9c392646f21a8be78a2efd503","totalVote":100000010,"creationHeight":0,"lastUpdateHeight":9,"isDelegate":false,"isProducer":false},{"address":"io1qyqsqqqq9emrdgarxqkptr3kq9lyryc49cakf5med3hl0x","pubKey":"d8c55ff7cd4cb4197aebf1d139f1a90533ed3b7e0bfc464b9e2b3543d9efdf7fd1042006672b6ecef3f3b678f04b950c9555e947bbc867534cc2b81534cf8cbf35fee31963ff4d02","totalVote":100000010,"creationHeight":0,"lastUpdateHeight":12,"isDelegate":false,"isProducer":false},{"address":"io1qyqsqqqqquxsgg26vv05dfa2z2w67sdjeukpscc7np9p70","pubKey":"ffac3effd19392028ccfd2c811c05e61b2f3fc6a0fd346ea06c27921a2b3ba6601f4b900aa74063b924cdaa79d21cd517f64603aa89da5c2158bfabfab8c6166ac46cf103e3e1101","totalVote":100000010,"creationHeight":0,"lastUpdateHeight":8,"isDelegate":false,"isProducer":false},{"address":"i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PublicKeyLength = 72 | |
type PublicKey [PublicKeyLength]byte | |
func PublicKeyFromHex(hex string) PublicKey [72]byte { ... } | |
func PublicKeyFromBytes(bytes []byte) PublicKey [72]byte { | |
var pk PublicKey | |
if len(bytes) != PublicKeyLength { | |
return pk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodeType: "full_node" | |
network: | |
host: "127.0.0.1" | |
port: 4689 | |
bootstrapNodes: | |
- "159.89.223.147:4689" | |
numPeersLowerBound: 1 | |
numPeersUpperBound: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodeType: "full_node" # should be one of "delegate", "full_node", and "lightweight" | |
network: | |
host: "<your_ip>" | |
port: 4689 | |
bootstrapNodes: | |
- "<bootstrap_node_ip>:4689" | |
chain: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delegates: | |
- rawaddress: io1qyqsyqcyyx5432ze42ep5vr3uqt7f5u37a7q240crjhp6n | |
publickey: 8031225bdd9bd86bb6cd3a5e4c1d9129e4a5039c9d87691f6719d5f172622111df3d19002ebbea798eb0944fe52c8dce00497afae1cc00c47f8277edf84deee55416d736778eaa05 | |
privatekey: c6534f5100419b5da0816c8f97c0a922acd45721636781477a7c3b31085ee6c5e7be9700 | |
- rawaddress: io1qyqsyqcydsf0vey4ffyudphdxdnu89f5re7axl828sk8zd | |
publickey: 9ed78fac4dc0668accd84b25fefb805f9aace43698e7bf72fef09bfde124d3f7c53a150303e0f7dcb64211a3c4ccc1af4d371813c51100d76361c3273cfeab480de80f53c4074706 | |
privatekey: 5458715b3e276bd7adc859790542df604e7ccf6c0767f0121ef47d866b910ec2376c0e01 | |
- rawaddress: io1qyqsyqcytqgppncxx5r7c5tnxhufq3e0e0y2d9tzj28xk6 | |
publickey: ca47e21556529a496f5e1a2e25b19ba619cd860d1cd515343c1e7010bf03a56a2636470403ae0dd694abd03c9c4af8c04d44e9760d3ecaff3fad58e93e62499c23f74c38ba570b07 | |
privatekey: 5fa2162584644b4c4076e842fa9b9fd8ec70fb536bf35347e89673116c8acbd442047201 |
NewerOlder