Skip to content

Commit

Permalink
Add log to NOWNode HTTP broadcast fallback routine
Browse files Browse the repository at this point in the history
  • Loading branch information
samholmes committed May 7, 2024
1 parent 8305457 commit 4e52b66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/utxobased/engine/ServerStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export function makeServerStates(config: ServerStateConfig): ServerStates {
// Broadcast through any HTTP URI that may be configured, only if no
// blockbook instances are connected.
if (!isAnyBlockbookConnected) {
// This is for the future when we want to HTTP servers from the user
// This is for the future when we want to get HTTP servers from the user
// settings:
// const httpUris = pluginState.getLocalServers(Infinity, [
// /^http(?:s)?:/i
Expand Down Expand Up @@ -398,6 +398,8 @@ export function makeServerStates(config: ServerStateConfig): ServerStates {
}

for (const uri of nowNodeUris) {
log('Falling back to NOWNode server broadcast over HTTP:', uri)

// HTTP Fallback
io.fetchCors(`${uri}/api/v2/sendtx/`, {
method: 'POST',
Expand Down

0 comments on commit 4e52b66

Please sign in to comment.