-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
46 lines (37 loc) · 942 Bytes
/
main.cpp
File metadata and controls
46 lines (37 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) 2019 The BigDNSeed developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <iostream>
#include "blockhead/type.h"
#include "blockhead/util.h"
#include "dnseed/entry.h"
using namespace std;
using namespace dnseed;
using namespace blockhead;
void BbShutdown()
{
CBbEntry::GetInstance().Stop();
}
int main(int argc,char **argv)
{
CBbEntry& bbEntry = CBbEntry::GetInstance();
try
{
if (bbEntry.Initialize(argc,argv))
{
blockhead::StdLog("MAIN", "Initialize success.");
bbEntry.Run();
}
}
catch (std::exception& e)
{
StdError(__PRETTY_FUNCTION__, e.what());
}
catch (...)
{
StdError(__PRETTY_FUNCTION__, "unknown");
}
bbEntry.Stop();
blockhead::StdLog("MAIN", "Program quit.");
return 0;
}