flocore/const.js
Ryan X. Charles ca67786a77 ran js-beautify on all bitcore source
js-beautify -s 2 -r *.js

...did not run on bundles, only on source.
2014-06-23 10:57:02 -07:00

21 lines
306 B
JavaScript

MSG = {
TX: 1,
BLOCK: 2,
FILTERED_BLOCK: 3,
};
MSG.to_str = function(t) {
switch (t) {
case MSG.TX:
return 'transaction';
case MSG.BLOCK:
return 'block';
case MSG.FILTERED_BLOCK:
return 'filtered block';
default:
return 'unknown';
}
}
exports.MSG = MSG;