From fe81049931e9e95d3f0bc81972ef0fef4d1ec230 Mon Sep 17 00:00:00 2001 From: cryptosharks131 Date: Tue, 25 May 2021 17:48:56 -0400 Subject: [PATCH] Add documentation to use global variable to update channel policies in python --- docs/grpc/python.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/grpc/python.md b/docs/grpc/python.md index 8c14d947..9e09d8b2 100644 --- a/docs/grpc/python.md +++ b/docs/grpc/python.md @@ -210,3 +210,13 @@ details around how to drive `gRPC` from Python. There is an [online API documentation](https://api.lightning.community?python) available that shows all currently existing RPC methods, including code snippets on how to use them. + +## Special Scenarios + +Due to a conflict between lnd's `UpdateChannelPolicy` gRPC endpoint and the python reserved word list, the follow syntax is required in order to use `PolicyUpdateRequest` with the `global` variable. +Here is an example of a working format that allows for use of a reserved word `global` in this scenario. + +``` +args = {'global': True, 'base_fee_msat': 1000, 'fee_rate': 0.000001, 'time_lock_delta': 40} +stub.UpdateChannelPolicy(ln.PolicyUpdateRequest(**args)) +``` \ No newline at end of file