Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ function Application() {

}

GLOBAL.app = new Application();
global.app = new Application();

1 change: 1 addition & 0 deletions node_modules/bitcoin/lib/bitcoin/client.js

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

4 changes: 2 additions & 2 deletions testnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function Application() {
}

function update_status() {
self.client.getInfo(function(err, info) {
self.client.getBlockchainInfo(function(err, info) {
if(err)
console.error("getInfo error:",err);
self.status.info = info;
Expand Down Expand Up @@ -267,7 +267,7 @@ function Application() {
dpc(2000, init);
}

GLOBAL.app = new Application();
global.app = new Application();

/*

Expand Down
29 changes: 28 additions & 1 deletion views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Application() {
// ---

_.each(response.last_blocks, function(o) {
str += "<a href='http://explorer.litecointools.com/block/"+o.hash+"' target='_blank'>"+o.height+" - "+o.hash+" <img src='link.gif'/></a><br/>";
str += "<a href='https://testnet.litecore.io/block/"+o.hash+"' target='_blank'>"+o.height+" - "+o.hash+" <img src='link.gif'/></a><br/>";
});

$("#last_blocks").html(str);
Expand All @@ -68,6 +68,33 @@ function Application() {
str = "<table>"
_.each(response.info, function(v,n) {
str += "<tr><td style='text-align:left;'>"+n+"</td><td style='text-align:left;'>";

switch (n) {
case "bestblockhash": {
var link = "<a href='https://testnet.litecore.io/block/"+v+"' target='_blank'>"+v+" <img src='link.gif'/></a>";
v = link
break;
}
case "softforks": {
var softforks = "";
_.each(response.info.softforks, function(softfork) {
softforks += softfork.id + ", ";
});
v = softforks.substr(0, softforks.length-2);
break;
}
case "bip9_softforks": {
var bip9softforks = "";
_.each(response.info.bip9_softforks, function(val, name) {
bip9softforks += name + " (" + val.status + "), ";
});
v = bip9softforks.substr(0, bip9softforks.length-2);
break;
}
default:
break;
}

str += v;
str += "</td></tr>";
})
Expand Down