Browse Source

Sync blockchain script fixed, some styling

stuff
xcps 6 years ago
parent
commit
376b3ce7a2
  1. 17
      bin/syncBlockchain.babel.js
  2. 20
      public/stylesheets/style.css
  3. 2
      views/layout.jade

17
bin/syncBlockchain.babel.js

@ -143,17 +143,16 @@ async function syncBlockchain() {
let currentHeight = await getCurrentHeight(); let currentHeight = await getCurrentHeight();
console.log('\x1b[36m%s\x1b[0m', 'currentHeight is', currentHeight); console.log('\x1b[36m%s\x1b[0m', 'currentHeight is', currentHeight);
while (syncedHeight < currentHeight) { try {
syncedHeight = await syncNextBlock(syncedHeight); while (syncedHeight < currentHeight) {
console.log('\x1b[36m%s\x1b[0m', 'syncedHeight: ', syncedHeight) syncedHeight = await syncNextBlock(syncedHeight);
console.log('\x1b[36m%s\x1b[0m', 'syncedHeight: ', syncedHeight)
}
} catch (e) {
console.log('=====', e);
process.exit(0);
} }
process.exit(0); process.exit(0);
} }
var postData = JSON.stringify({
'method': 'getinfo',
'params': [],
'id': 1
});
syncBlockchain(); syncBlockchain();

20
public/stylesheets/style.css

@ -34,19 +34,30 @@ a:hover {
align: center; align: center;
outline: none; outline: none;
} }
.header h1 a:hover {
border-bottom: 3px solid;
border-bottom-color: #CF7F7F;
}
.header .logo { .header .logo {
float: left; float: left;
} }
.header .logo a img:hover { .header .logo a img:hover {
filter: brightness(1.25); filter: brightness(1.25);
} }
.header .logo a img { .header .logo a img {
height: 84px; height: 77px;
position: relative; position: relative;
margin-right: 1em; margin-right: 1em;
} }
.search-wrapper {
margin-top: 1em;
}
form.search input[type="submit"] { form.search input[type="submit"] {
padding: .2em .7em; padding: .2em .7em;
} }
@ -61,15 +72,10 @@ form.search input[type="text"] {
padding: .2em; padding: .2em;
} }
.header h1 a:hover {
border-bottom: 3px solid;
border-bottom-color: #CF7F7F;
}
.content { .content {
margin-top: 2em; margin-top: 2em;
} }
.capitalize { .capitalize {
text-transform: capitalize; text-transform: capitalize;
} }

2
views/layout.jade

@ -13,7 +13,7 @@ html
img(src='/images/gostcoin-b.png') img(src='/images/gostcoin-b.png')
h1 h1
a(href='/') GOSTcoin blockchain explorer a(href='/') GOSTcoin blockchain explorer
div div.search-wrapper
form.search(action="/search/", method="POST") form.search(action="/search/", method="POST")
input(type="text", name="search" placeholder="Search by transaction id, block hash/index or address", size="68") input(type="text", name="search" placeholder="Search by transaction id, block hash/index or address", size="68")
input(type="submit", value=">>") input(type="submit", value=">>")

Loading…
Cancel
Save