Skip to content

Commit b7915f8

Browse files
authored
Merge pull request tronprotocol#1565 from tronprotocol/wubin12-patch-2
Update README.md
2 parents 1f29447 + 3b4a603 commit b7915f8

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

‎src/main/java/org/tron/core/config/README.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,42 @@ node {
7878
}
7979
```
8080

81+
## backup
82+
You can custom backup options in the `node.backup` part of `config.conf`, which looks like:
83+
```
84+
node.backup {
85+
# my priority, each member should use different priority
86+
priority =
87+
# members should use same port
88+
port =
89+
# peer's ip list, can't contain mine
90+
members = []
91+
}
92+
```
93+
policy:
94+
1. the one which synchronized first will become master.
95+
2. if synchronization is completed at the same time, the one which with big priority will become master.
96+
97+
E.g. create backups for node A(192.168.0.100) and node B(192.168.0.100 ):
98+
node A's configuration:
99+
```
100+
node.backup {
101+
priority = 8
102+
port = 10001
103+
members = [
104+
"192.168.0.101"
105+
]
106+
}
107+
```
108+
node B's configuration:
109+
```
110+
node.backup {
111+
priority = 5
112+
port = 10001
113+
members = [
114+
"192.168.0.100"
115+
]
116+
}
117+
```
118+
81119
You may refer to the source code of `io.grpc.netty.NettyServerBuilder` class to see details or just make a decision according to the brief comments above.

0 commit comments

Comments
 (0)