-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4bf281
commit 0d84694
Showing
11 changed files
with
577 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
console.log('Starting bcoin'); | ||
process.title = 'bcoin'; | ||
const Neutrino = require('../lib/node/neutrino'); | ||
|
||
const node = new Neutrino({ | ||
file: true, | ||
argv: true, | ||
env: true, | ||
logFile: true, | ||
logConsole: true, // todo: remove | ||
logLevel: 'debug', // todo: remove | ||
db: 'leveldb', | ||
memory: false, | ||
workers: true, | ||
loader: require | ||
}); | ||
|
||
if (!node.config.bool('no-wallet') && !node.has('walletdb')) { | ||
const plugin = require('../lib/wallet/plugin'); | ||
node.use(plugin); | ||
} | ||
|
||
(async () => { | ||
await node.ensure(); | ||
await node.open(); | ||
await node.connect(); | ||
node.startSync(); | ||
})().catch((err) => { | ||
console.error(err.stack); | ||
process.exit(1); | ||
}); | ||
|
||
process.on('unhandledRejection', (err, promise) => { | ||
throw err; | ||
}); | ||
|
||
process.on('SIGINT', async () => { | ||
await node.close(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.