Skip to content

Commit 7fd9814

Browse files
committed
config: add ticket params, remove orchaddr
1 parent b89b22d commit 7fd9814

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

cmd/catalyst/catalyst.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ func main() {
3131
fs.StringVar(&cli.EthURL, "eth-url", "", "HTTPS URL of an Ethereum RPC provider for your selected network")
3232
fs.StringVar(&cli.EthKeystorePath, "eth-keystore-path", "/keystore", "Path to an Ethereum keystore")
3333
fs.StringVar(&cli.EthPassword, "eth-password", "", "Ethereum password or path to password file")
34+
fs.StringVar(&cli.MaxTicketEV, "max-ticket-ev", "50000000001", "The maximum acceptable expected value for one PM ticket")
35+
fs.StringVar(&cli.MaxTotalEV, "max-total-ev", "20000000000000", "The maximum acceptable expected value for one PM payment")
36+
fs.StringVar(&cli.MaxPricePerUnit, "max-price-per-unit", "700", "The maximum transcoding price (in wei) per 'pixelsPerUnit' a broadcaster is willing to accept. If not set explicitly, broadcaster is willing to accept ANY price")
3437

3538
ff.Parse(
3639
fs, os.Args[1:],

cmd/catalyst/config/config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ type Cli struct {
3232
EthURL string
3333
EthKeystorePath string
3434
EthPassword string
35+
MaxTicketEV string
36+
MaxTotalEV string
37+
MaxPricePerUnit string
3538
}
3639

3740
type DBObject map[string]any
@@ -171,6 +174,11 @@ func tweakProtocol(protocol *Protocol, cli *Cli, u *url.URL) bool {
171174
protocol.EthKeystorePath = cli.EthKeystorePath
172175
protocol.EthPassword = cli.EthPassword
173176
protocol.EthURL = cli.EthURL
177+
protocol.MaxPricePerUnit = cli.MaxPricePerUnit
178+
protocol.MaxTicketEV = cli.MaxTicketEV
179+
protocol.MaxTotalEV = cli.MaxTotalEV
180+
} else {
181+
protocol.OrchAddr = "http://127.0.0.1:8936"
174182
}
175183
} else if protocol.Connector == "livepeer" && protocol.Broadcaster && protocol.MetadataQueueURI != "" {
176184
// live broadcaster

cmd/catalyst/config/full-stack.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
"monitor": true,
7070
"cliAddr": "127.0.0.1:7935",
7171
"httpAddr": "127.0.0.1:8935",
72-
"orchAddr": "127.0.0.1:8936",
7372
"rtmpAddr": "127.0.0.1:1936",
7473
"metadataQueueUri": "amqp://localhost:5672/livepeer",
7574
"v": "2"
@@ -82,7 +81,6 @@
8281
"monitor": true,
8382
"httpAddr": "127.0.0.1:8937",
8483
"cliAddr": "127.0.0.1:7937",
85-
"orchAddr": "127.0.0.1:8936",
8684
"rtmpAddr": "127.0.0.1:1937",
8785
"v": "2"
8886
},

cmd/catalyst/config/mist_config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ type Protocol struct {
8383
EthURL string `json:"ethUrl,omitempty"`
8484
EthKeystorePath string `json:"ethKeystorePath,omitempty"`
8585
EthPassword string `json:"ethPassword,omitempty"`
86+
MaxTicketEV string `json:"maxTicketEV,omitempty"`
87+
MaxTotalEV string `json:"maxTotalEV,omitempty"`
88+
MaxPricePerUnit string `json:"maxPricePerUnit,omitempty"`
8689

8790
ICEServers []ICEServer `json:"iceservers,omitempty"`
8891
// And finally, four ways to spell the same thing:

0 commit comments

Comments
 (0)