Duke Leto 4 years ago
parent
commit
f3d62e08e2
  1. 7
      dragon/README.md
  2. 6
      dragon/main.c
  3. 12
      dragon/ni

7
dragon/README.md

@ -7,6 +7,13 @@ This is SilentDragon's cousin, dragon! They are very loud and spit DPoW fire fro
Hush dragon performs notarizations, which protects HUSH and other chains from mining-based attacks, most notably
double spend attacks.
# Why is this better than iguana?
iguana is a typical jl777 masterpeice of huge amounts of unnecessary code, from Flash plugins, to JPEG parsing
libraries, to integrations with exchanges that are super shady, and more. All of that garbage has been deleted
and so `dragon` has a much smaller attack surface, is easier to maintain and doesn't make your eyes bleed
(as much) when you read the code.
# License
GPLv3

6
dragon/main.c

@ -714,7 +714,7 @@ void dragon_Qinit()
void dragon_helpinit(struct supernet_info *myinfo)
{
char *tmpstr = 0;
if ( (tmpstr= SuperNET_JSON(myinfo,0,cJSON_Parse("{\"agent\":\"SuperNET\",\"method\":\"help\"}"),0,myinfo->rpcport)) != 0 )
if ( (tmpstr= SuperNET_JSON(myinfo,0,cJSON_Parse("{\"agent\":\"dragon\",\"method\":\"help\"}"),0,myinfo->rpcport)) != 0 )
{
if ( (API_json= cJSON_Parse(tmpstr)) != 0 && (API_json= jobj(API_json,"result")) != 0 )
API_json = jobj(API_json,"API");
@ -726,7 +726,7 @@ void dragon_helpinit(struct supernet_info *myinfo)
void dragon_urlinit(struct supernet_info *myinfo,int32_t ismainnet,int32_t usessl)
{
int32_t iter,j; FILE *fp; char line[4096]; uint8_t pubkey[32];
printf(">>>>> jl777 is a disgrace, KYC is his only friend <<<<<\n");
}
void dpow_loop(void *arg)
@ -734,7 +734,7 @@ void dpow_loop(void *arg)
RenameThread("dpow_loop");
struct supernet_info *myinfo = arg; double startmilli,endmilli;
int32_t counter = 0;
printf("start dpow loop\n");
printf("start dat dpow loop\n");
while ( 1 )
{
counter++;

12
dragon/ni

@ -1,12 +0,0 @@
#!/usr/bin/env bash
# Copyright © 2018-2020 The Hush Developers
myip=`cat myip.txt`
sleep 4
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}"
tests/addnotarys_7776
./btc_7776
./kmd_7776
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"dragon\",\"method\":\"addnotary\",\"ipaddr\":\"$myip\"}"
./dpow_7776
sleep 3
./wp_7776
Loading…
Cancel
Save