You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b7915f8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/main/java/org/tron/core/config/README.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,4 +78,42 @@ node {
78
78
}
79
79
```
80
80
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
+
81
119
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