Skip to content

Commit

Permalink
Update to new erc20lib
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Oct 25, 2023
1 parent 6e13c16 commit 455d211
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ members = [
# diesel 1.4.* supports up to 0.23.0, but sqlx 0.5.9 requires 0.22.0
# sqlx 0.5.10 need 0.23.2, so 0.5.9 is last version possible
libsqlite3-sys = { version = "0.26.0", features = ["bundled"] }
erc20_payment_lib = { git = "https://github.com/golemfactory/erc20_payment_lib", rev = "0d6887c9150e37159e08763016320d7e854f0697" }
erc20_payment_lib = { git = "https://github.com/golemfactory/erc20_payment_lib", rev = "84941d52ed78053ce605e4a36f986b01f05beb0f" }
#erc20_payment_lib = { path = "../../payments/erc20_payment_lib/crates/erc20_payment_lib" }
#erc20_payment_lib = { version = "=0.2.2" }
rand = "0.8.5"
Expand Down
19 changes: 17 additions & 2 deletions core/payment-driver/erc20next/config-payments.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
[engine]
service-sleep = 1
process-sleep = 1
# proces interval (in seconds) is to set how often we want to recheck transaction status
# minimum 1 second, sensible maximum around 60 seconds
process-interval = 15
# proces interval after send (in seconds) is to set how long to wait after sending transaction before checking for confirmation
# sensible minimum 20 seconds, sensible maximum around 60 seconds
process-interval-after-send = 30
# proces interval after error (in seconds) is to set how long to wait after encountering error before trying again
# minimum 1 second, sensible maximum around 60 seconds
process-interval-after-error = 25
# report alive interval (in seconds) is to set how often we want to report that we are alive
# minimum 1 second, maximum is capped by gather-interval
report-alive-interval = 30
# gather interval (in seconds) is to set how often payments are gathered
# minimum 1 second, no maximum limit
gather-interval = 60
# gather payments on payment driver start (otherwise wait for first gather-interval)
gather-at-start = true
automatic-recover = false

[chain.goerli]
Expand Down
2 changes: 1 addition & 1 deletion core/payment-driver/erc20next/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl Erc20NextService {

for (network, chain) in &mut config.chain {
let prefix = network.to_ascii_uppercase();
let Some(token) = &mut chain.token else { continue };
let mut token = chain.token.clone();
let symbol = token.symbol.to_ascii_uppercase();

let rpc_env = format!("{prefix}_GETH_ADDR");
Expand Down
2 changes: 1 addition & 1 deletion core/payment/src/payment_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async fn payment_sync(db: &DbExecutor, peer_id: NodeId) -> anyhow::Result<Paymen
}

Ok(PaymentSync {
payments: payments,
payments,
invoice_accepts,
debit_note_accepts,
})
Expand Down

0 comments on commit 455d211

Please sign in to comment.